diff --git a/test/flick/ranked_voting_test.exs b/test/flick/ranked_voting_test.exs index 48771f4..2775d7f 100644 --- a/test/flick/ranked_voting_test.exs +++ b/test/flick/ranked_voting_test.exs @@ -265,13 +265,13 @@ defmodule Flick.RankedVotingTest do describe "create_vote/2" do setup do - ballot = + prepublished_ballot = ballot_fixture( question_title: "What's for dinner?", possible_answers: "Pizza, Tacos, Sushi, Burgers" ) - {:ok, ballot} = RankedVoting.publish_ballot(ballot) + {:ok, ballot} = RankedVoting.publish_ballot(prepublished_ballot) {:ok, published_ballot: ballot} end diff --git a/test/flick_web/live/vote/vote_capture_live_test.exs b/test/flick_web/live/vote/vote_capture_live_test.exs index 46cc761..137b713 100644 --- a/test/flick_web/live/vote/vote_capture_live_test.exs +++ b/test/flick_web/live/vote/vote_capture_live_test.exs @@ -10,14 +10,14 @@ defmodule FlickWeb.Vote.VoteCaptureLiveTest do alias Flick.RankedVoting.Ballot setup ~M{conn} do - ballot = + prepublished_ballot = ballot_fixture(%{ question_title: "What movie should we go see?", possible_answers: "Hackers, Sneakers, WarGames, The Matrix, Tron", url_slug: "movie-night" }) - {:ok, ballot} = Flick.RankedVoting.publish_ballot(ballot) + {:ok, ballot} = Flick.RankedVoting.publish_ballot(prepublished_ballot) {:ok, view, _html} = live(conn, ~p"/ballot/movie-night") ~M{conn, view, ballot}