From aff4790d22728d89e7e2dac8af262c92087b5b39 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sat, 11 Sep 2021 12:27:59 +0200 Subject: Piece evry last week changes together in a big rewrite of the webui --- internal/webui/root_test.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'internal/webui/root_test.go') diff --git a/internal/webui/root_test.go b/internal/webui/root_test.go index 7e4ec71..e96f1c8 100644 --- a/internal/webui/root_test.go +++ b/internal/webui/root_test.go @@ -24,15 +24,8 @@ func TestRootHandler(t *testing.T) { require.Nil(t, err) e := env{ dbEnv: dbEnv, - conf: &config.Config{TrainStop: "test"}, + conf: &config.Config{}, } - departures1 := []model.Departure{ - model.Departure{ - Direction: "test direction", - Arrival: "20210503T150405", - }, - } - e.navitia = &NavitiaMockClient{departures: departures1, err: nil} // test GET requests runHttpTest(t, &e, rootHandler, &httpTestCase{ name: "a simple get when not logged in should redirect to the login page", @@ -46,7 +39,7 @@ func TestRootHandler(t *testing.T) { }, }) runHttpTest(t, &e, rootHandler, &httpTestCase{ - name: "a simple get when logged in should display the departure times", + name: "a simple get when logged in should display the menu", input: httpTestInput{ method: http.MethodGet, path: "/", @@ -54,7 +47,7 @@ func TestRootHandler(t *testing.T) { }, expect: httpTestExpect{ code: http.StatusOK, - bodyString: "Horaires des prochains trains", + bodyString: "Menu", }, }) } -- cgit v1.2.3