diff --git a/lib/skate/open_route_service_api.ex b/lib/skate/open_route_service_api.ex index 1b45f84d6..9ac9f17b6 100644 --- a/lib/skate/open_route_service_api.ex +++ b/lib/skate/open_route_service_api.ex @@ -24,10 +24,10 @@ defmodule Skate.OpenRouteServiceAPI do ], directions: [ %{ - instruction: "Turn right onto 1st Avenue" + instruction: "R - 1st Avenue" }, %{ - instruction: "Turn left onto 2nd Place" + instruction: "L - 2nd Place" } ] } diff --git a/test/skate/open_route_service_api_test.exs b/test/skate/open_route_service_api_test.exs index a9162dcf4..d3d7897d8 100644 --- a/test/skate/open_route_service_api_test.exs +++ b/test/skate/open_route_service_api_test.exs @@ -84,15 +84,18 @@ defmodule Skate.OpenRouteServiceAPITest do "steps" => [ %{ "instruction" => "not-in-results", + "name" => "not-in-results", # Depart "type" => 11 }, %{ "instruction" => "1", + "name" => "A Street", "type" => 1 }, %{ "instruction" => "not-in-results", + "name" => "not-in-results", # Goal "type" => 10 } @@ -102,16 +105,19 @@ defmodule Skate.OpenRouteServiceAPITest do "steps" => [ %{ "instruction" => "not-in-results", + "name" => "not-in-results", # Depart "type" => 11 }, %{ "instruction" => "not-in-results", + "name" => "not-in-results", # Straight "type" => 6 }, %{ "instruction" => "2", + "name" => "B Drive", "type" => 0 } ] @@ -124,8 +130,8 @@ defmodule Skate.OpenRouteServiceAPITest do assert {:ok, %DirectionsResponse{ directions: [ - %{instruction: "1"}, - %{instruction: "2"} + %{instruction: "R - A Street"}, + %{instruction: "L - B Drive"} ] }} = Skate.OpenRouteServiceAPI.directions([ diff --git a/test/skate_web/controllers/detour_route_controller_test.exs b/test/skate_web/controllers/detour_route_controller_test.exs index 7c864d32f..cb8a1ca65 100644 --- a/test/skate_web/controllers/detour_route_controller_test.exs +++ b/test/skate_web/controllers/detour_route_controller_test.exs @@ -66,11 +66,13 @@ defmodule SkateWeb.DetourRouteControllerTest do "steps" => [ %{ "instruction" => "1", - "type" => 1 + "type" => 1, + "name" => "First Street" }, %{ "instruction" => "2", - "type" => 0 + "type" => 0, + "name" => "Second Street" } ] }, @@ -78,7 +80,8 @@ defmodule SkateWeb.DetourRouteControllerTest do "steps" => [ %{ "instruction" => "3", - "type" => 2 + "type" => 2, + "name" => "Third Street" } ] } @@ -94,9 +97,9 @@ defmodule SkateWeb.DetourRouteControllerTest do assert %{ "data" => %{ "directions" => [ - %{"instruction" => "1"}, - %{"instruction" => "2"}, - %{"instruction" => "3"} + %{"instruction" => "R - First Street"}, + %{"instruction" => "L - Second Street"}, + %{"instruction" => "L - Third Street"} ] } } = diff --git a/test/skate_web/controllers/detours_controller_test.exs b/test/skate_web/controllers/detours_controller_test.exs index a604487d7..df6672f26 100644 --- a/test/skate_web/controllers/detours_controller_test.exs +++ b/test/skate_web/controllers/detours_controller_test.exs @@ -786,11 +786,13 @@ defmodule SkateWeb.DetoursControllerTest do "steps" => [ %{ "instruction" => "1", - "type" => 1 + "type" => 1, + "name" => "A" }, %{ "instruction" => "2", - "type" => 0 + "type" => 0, + "name" => "B" } ] }, @@ -798,7 +800,8 @@ defmodule SkateWeb.DetoursControllerTest do "steps" => [ %{ "instruction" => "3", - "type" => 2 + "type" => 2, + "name" => "C" } ] } @@ -836,9 +839,9 @@ defmodule SkateWeb.DetoursControllerTest do "data" => %{ "detour_shape" => %{ "directions" => [ - %{"instruction" => "1"}, - %{"instruction" => "2"}, - %{"instruction" => "3"} + %{"instruction" => "R - A"}, + %{"instruction" => "L - B"}, + %{"instruction" => "L - C"} ] } }