Skip to content

Commit

Permalink
fix:test: generate snapshot for test so all properties are present
Browse files Browse the repository at this point in the history
  • Loading branch information
firestack committed Jan 29, 2025
1 parent 8d05cb5 commit f9cae3f
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions test/skate_web/controllers/detours_controller_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -460,24 +460,10 @@ defmodule SkateWeb.DetoursControllerTest do
other_user = insert(:user)

# Manually insert a detour by another user
Detours.upsert_from_snapshot(other_user.id, %{
"context" => %{
"route" => %{
"id" => "23",
"name" => "23",
"directionNames" => %{
"0" => "Outbound",
"1" => "Inbound"
}
},
"routePattern" => %{
"headsign" => "Headsign",
"directionId" => 0
},
"nearestIntersection" => "Street A & Avenue B",
"uuid" => 10
}
})
Detours.upsert_from_snapshot(
other_user.id,
build(:detour_snapshot)
)

conn = get(conn, ~p"/api/detours")

Expand Down

0 comments on commit f9cae3f

Please sign in to comment.