aboutsummaryrefslogtreecommitdiff
path: root/internal/webui/utils_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/webui/utils_test.go')
-rw-r--r--internal/webui/utils_test.go15
1 files changed, 15 insertions, 0 deletions
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 {