aboutsummaryrefslogtreecommitdiff
path: root/internal/webui
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--internal/webui/root_test.go14
-rw-r--r--internal/webui/utils_test.go15
2 files changed, 15 insertions, 14 deletions
diff --git a/internal/webui/root_test.go b/internal/webui/root_test.go
index b86bb1c..7e4ec71 100644
--- a/internal/webui/root_test.go
+++ b/internal/webui/root_test.go
@@ -10,20 +10,6 @@ import (
"github.com/stretchr/testify/require"
)
-type NavitiaMockClient struct {
- departures []model.Departure
- trainStops []model.Stop
- err error
-}
-
-func (c *NavitiaMockClient) GetDepartures(trainStop string) (departures []model.Departure, err error) {
- return c.departures, c.err
-}
-
-func (c *NavitiaMockClient) GetStops() (trainStops []model.Stop, 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")
diff --git a/internal/webui/utils_test.go b/internal/webui/utils_test.go
index 1e07aa2..bd24dd5 100644
--- a/internal/webui/utils_test.go
+++ b/internal/webui/utils_test.go
@@ -9,10 +9,25 @@ import (
"strings"
"testing"
+ "git.adyxax.org/adyxax/trains/pkg/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+type NavitiaMockClient struct {
+ departures []model.Departure
+ stops []model.Stop
+ err error
+}
+
+func (c *NavitiaMockClient) GetDepartures(stop string) (departures []model.Departure, err error) {
+ return c.departures, c.err
+}
+
+func (c *NavitiaMockClient) GetStops() (stops []model.Stop, err error) {
+ return c.stops, c.err
+}
+
var simpleErrorMessage = fmt.Errorf("")
type httpTestCase struct {