Skip to content

Commit

Permalink
fix:test: assert on ID rather than all properties
Browse files Browse the repository at this point in the history
  • Loading branch information
firestack committed Jan 29, 2025
1 parent f9cae3f commit abbbfd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/skate/detours/db_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ defmodule Skate.Detours.DbTest do
end

test "list_detours/0 returns all detours" do
detour = detour_fixture()
assert Skate.Repo.preload(Detours.list_detours(), :author) == [detour]
%{id: id} = detour_fixture()
assert [%{id: ^id}] = Skate.Repo.preload(Detours.list_detours(), :author)
end

test "get_detour!/1 returns the detour with given id" do
Expand Down

0 comments on commit abbbfd0

Please sign in to comment.