From 678fdf8759a7a6ed6628194d085a47b5490e68ea Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 10 Sep 2021 17:26:23 +0200 Subject: Finished not so simple refactoring --- pkg/navitia_api_client/stops_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'pkg/navitia_api_client/stops_test.go') diff --git a/pkg/navitia_api_client/stops_test.go b/pkg/navitia_api_client/stops_test.go index 0b94765..c3a91f2 100644 --- a/pkg/navitia_api_client/stops_test.go +++ b/pkg/navitia_api_client/stops_test.go @@ -72,13 +72,13 @@ func TestGetStops(t *testing.T) { // normal working request client, ts = newTestClientFromFilename(t, "test_data/4-train-stops.json") defer ts.Close() - trainStops, err := client.GetStops() + stops, err := client.GetStops() if err != nil { t.Fatalf("could not get train stops : %s", err) } // 4 records but one is empty (navitia api quirk) - if len(trainStops) != 3 { - t.Fatalf("did not decode train stops properly, got %d train stops when expected 4", len(trainStops)) + if len(stops) != 3 { + t.Fatalf("did not decode train stops properly, got %d train stops when expected 4", len(stops)) } // normal request in multiple pages client, ts = newTestClientFromFilenames(t, []testClientCase{ @@ -87,13 +87,13 @@ func TestGetStops(t *testing.T) { testClientCase{"/coverage/sncf/stop_areas?count=1000&start_page=2", "test_data/4-train-stops-page-2.json"}, }) defer ts.Close() - trainStops, err = client.GetStops() + stops, err = client.GetStops() if err != nil { t.Fatalf("could not get train stops : %+v", err) } // 12 records but one is empty (navitia api quirk) - if len(trainStops) != 11 { - t.Fatalf("did not decode train stops properly, got %d train stops when expected 4", len(trainStops)) + if len(stops) != 11 { + t.Fatalf("did not decode train stops properly, got %d train stops when expected 4", len(stops)) } // failing request in multiple pages with last one missing client, ts = newTestClientFromFilenames(t, []testClientCase{ @@ -101,8 +101,8 @@ func TestGetStops(t *testing.T) { testClientCase{"/coverage/sncf/stop_areas?count=1000&start_page=1", "test_data/4-train-stops-page-1.json"}, }) defer ts.Close() - trainStops, err = client.GetStops() + stops, err = client.GetStops() if err == nil { - t.Fatalf("should not be able to get train stops : %+v", trainStops) + t.Fatalf("should not be able to get train stops : %+v", stops) } } -- cgit v1.2.3