Skip to content

Commit

Permalink
fix: expose arrow id for shuttle stops view
Browse files Browse the repository at this point in the history
  • Loading branch information
meagharty committed Sep 18, 2024
1 parent 0deffff commit bc26aae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/arrow_web/controllers/api_html/stops_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ defmodule ArrowWeb.API.StopsView do
|> Map.take(@fields)
end

def id(stop, _conn), do: stop.stop_id
def id(stop, _conn), do: stop.id
end
12 changes: 6 additions & 6 deletions test/arrow_web/controllers/api/stops_controller_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ defmodule ArrowWeb.API.StopsControllerTest do
"stop_name" => stop1.stop_name,
"updated_at" => DateTime.to_iso8601(stop1.updated_at)
},
"id" => stop1.stop_id,
"id" => "#{stop1.id}",
"type" => "stops"
},
%{
Expand All @@ -54,7 +54,7 @@ defmodule ArrowWeb.API.StopsControllerTest do
"stop_name" => stop2.stop_name,
"updated_at" => DateTime.to_iso8601(stop2.updated_at)
},
"id" => stop2.stop_id,
"id" => "#{stop2.id}",
"type" => "stops"
},
%{
Expand All @@ -68,7 +68,7 @@ defmodule ArrowWeb.API.StopsControllerTest do
"stop_name" => stop3.stop_name,
"updated_at" => DateTime.to_iso8601(stop3.updated_at)
},
"id" => stop3.stop_id,
"id" => "#{stop3.id}",
"type" => "stops"
}
] == data
Expand Down Expand Up @@ -103,7 +103,7 @@ defmodule ArrowWeb.API.StopsControllerTest do
"at_street" => "At Avenue",
"on_street" => "On Street"
},
"id" => stop1.stop_id,
"id" => "#{stop1.id}",
"type" => "stops"
},
%{
Expand All @@ -118,7 +118,7 @@ defmodule ArrowWeb.API.StopsControllerTest do
"updated_at" => DateTime.to_iso8601(stop2.updated_at),
"at_street" => "At Avenue"
},
"id" => stop2.stop_id,
"id" => "#{stop2.id}",
"type" => "stops"
},
%{
Expand All @@ -133,7 +133,7 @@ defmodule ArrowWeb.API.StopsControllerTest do
"updated_at" => DateTime.to_iso8601(stop3.updated_at),
"on_street" => "On Street"
},
"id" => stop3.stop_id,
"id" => "#{stop3.id}",
"type" => "stops"
}
] == data
Expand Down

0 comments on commit bc26aae

Please sign in to comment.