From de9257ba6591c2022b560f7027e83547fe74f8a5 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Tue, 7 Sep 2021 15:44:44 +0200 Subject: Added navitia code to fetch train stops names --- internal/webui/root_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'internal') diff --git a/internal/webui/root_test.go b/internal/webui/root_test.go index cd2da0f..945f04b 100644 --- a/internal/webui/root_test.go +++ b/internal/webui/root_test.go @@ -12,6 +12,7 @@ import ( type NavitiaMockClient struct { departures []model.Departure + trainStops []model.TrainStop err error } @@ -19,6 +20,10 @@ func (c *NavitiaMockClient) GetDepartures(trainStop string) (departures []model. return c.departures, c.err } +func (c *NavitiaMockClient) GetTrainStops() (trainStops []model.TrainStop, err error) { + return c.trainStops, c.err +} + func TestRootHandler(t *testing.T) { // test environment setup dbEnv, err := database.InitDB("sqlite3", "file::memory:?_foreign_keys=on") -- cgit v1.2.3