Skip to content

Commit

Permalink
Fix tests with new id.
Browse files Browse the repository at this point in the history
  • Loading branch information
zorn committed Aug 13, 2024
1 parent de4d82f commit 2990391
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/flick_web/live/ballots/index_live_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ defmodule FlickWeb.Ballots.IndexLiveTest do
test "renders list of ballots", ~M{conn} do
ballots = Enum.map(1..3, fn _ -> ballot_fixture() end)
assert {:ok, view, _html} = live(conn, ~p"/admin/ballots")
assert has_element?(view, "table#ballots")
assert has_element?(view, "tbody#ballots")

for ballot <- ballots do
row_selector = "table#ballots tr#ballot-row-#{ballot.id}"
row_selector = "tbody#ballots tr#ballot-row-#{ballot.id}"
assert has_element?(view, row_selector, ballot.question_title)
assert has_element?(view, row_selector, "Not Published")
end
Expand Down

0 comments on commit 2990391

Please sign in to comment.