diff options
author | Julien Dessaux | 2021-04-05 17:57:40 +0200 |
---|---|---|
committer | Julien Dessaux | 2021-04-05 17:57:40 +0200 |
commit | d4cf6b83d2039852ac50f2d9cf49c40552362541 (patch) | |
tree | dc8033ed1495e52768f31f9c4d7d3e2a34276514 /pkg/navitia_api_client/departures_test.go | |
parent | Moved code around to conform best practices (diff) | |
download | trains-d4cf6b83d2039852ac50f2d9cf49c40552362541.tar.gz trains-d4cf6b83d2039852ac50f2d9cf49c40552362541.tar.bz2 trains-d4cf6b83d2039852ac50f2d9cf49c40552362541.zip |
Fixed scope of test helpers in navitia_api_client package
Diffstat (limited to 'pkg/navitia_api_client/departures_test.go')
-rw-r--r-- | pkg/navitia_api_client/departures_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/navitia_api_client/departures_test.go b/pkg/navitia_api_client/departures_test.go index a1658d2..14ffb96 100644 --- a/pkg/navitia_api_client/departures_test.go +++ b/pkg/navitia_api_client/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, "test_data/invalid.json") + client, ts := newTestClientFromFilename(t, "test_data/invalid.json") defer ts.Close() _, err = client.GetDepartures() if err == nil { @@ -30,13 +30,13 @@ func TestGetDepartures(t *testing.T) { ts = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusNotFound) })) - client = NewTestClient(ts) + client = newTestClient(ts) _, err = client.GetDepartures() if err == nil { t.Fatalf("404 should raise an error") } // normal working request - client, ts = NewTestClientFromFilename(t, "test_data/normal-crepieux.json") + client, ts = newTestClientFromFilename(t, "test_data/normal-crepieux.json") defer ts.Close() departures, err := client.GetDepartures() if err != nil { |