aboutsummaryrefslogtreecommitdiff
path: root/internal/webui
diff options
context:
space:
mode:
authorJulien Dessaux2021-09-07 15:44:44 +0200
committerJulien Dessaux2021-09-07 15:44:44 +0200
commitde9257ba6591c2022b560f7027e83547fe74f8a5 (patch)
tree2e6afab492a00af7ebc4a4ecffc7ca598043e2f7 /internal/webui
parentGo 1.17 (diff)
downloadtrains-de9257ba6591c2022b560f7027e83547fe74f8a5.tar.gz
trains-de9257ba6591c2022b560f7027e83547fe74f8a5.tar.bz2
trains-de9257ba6591c2022b560f7027e83547fe74f8a5.zip
Added navitia code to fetch train stops names
Diffstat (limited to 'internal/webui')
-rw-r--r--internal/webui/root_test.go5
1 files changed, 5 insertions, 0 deletions
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")