aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2021-03-29 00:01:58 +0200
committerJulien Dessaux2021-03-29 00:01:58 +0200
commit67e8b2db609ac37f17e6446053e98fbde8425871 (patch)
tree4e8859399f228cc44a06132cc6c1a54cb01fe413
parentAdded basic config module (diff)
downloadtrains-67e8b2db609ac37f17e6446053e98fbde8425871.tar.gz
trains-67e8b2db609ac37f17e6446053e98fbde8425871.tar.bz2
trains-67e8b2db609ac37f17e6446053e98fbde8425871.zip
Moved api test files into their own folder
-rw-r--r--api/departures_test.go4
-rw-r--r--api/test_data/invalid.json (renamed from api/invalid.json)0
-rw-r--r--api/test_data/normal-crepieux.json (renamed from api/normal-crepieux.json)0
3 files changed, 2 insertions, 2 deletions
diff --git a/api/departures_test.go b/api/departures_test.go
index b0a5dc5..ad9d913 100644
--- a/api/departures_test.go
+++ b/api/departures_test.go
@@ -20,7 +20,7 @@ func TestGetDepartures(t *testing.T) {
t.Fatalf("unreachable server should raise an error")
}
// invalid json
- client, ts := NewTestClientFromFilename(t, "invalid.json")
+ client, ts := NewTestClientFromFilename(t, "test_data/invalid.json")
defer ts.Close()
_, err = client.GetDepartures()
if err == nil {
@@ -36,7 +36,7 @@ func TestGetDepartures(t *testing.T) {
t.Fatalf("404 should raise an error")
}
// normal working request
- client, ts = NewTestClientFromFilename(t, "normal-crepieux.json")
+ client, ts = NewTestClientFromFilename(t, "test_data/normal-crepieux.json")
defer ts.Close()
departures, err := client.GetDepartures()
if err != nil {
diff --git a/api/invalid.json b/api/test_data/invalid.json
index 98232c6..98232c6 100644
--- a/api/invalid.json
+++ b/api/test_data/invalid.json
diff --git a/api/normal-crepieux.json b/api/test_data/normal-crepieux.json
index 19a635a..19a635a 100644
--- a/api/normal-crepieux.json
+++ b/api/test_data/normal-crepieux.json