Skip to content

Commit

Permalink
Pipe lint check.
Browse files Browse the repository at this point in the history
  • Loading branch information
zorn committed Sep 8, 2024
1 parent 79b1aa4 commit c11331d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/flick/ranked_voting/vote.ex
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ defmodule Flick.RankedVoting.Vote do
ballot = Flick.RankedVoting.get_ballot!(get_field(changeset, :ballot_id))
possible_answers = Ballot.possible_answers_as_list(ballot.possible_answers) ++ ["", nil]

Enum.reduce(new_ranked_answers, [], fn changeset, acc ->
new_ranked_answers
|> Enum.reduce([], fn changeset, acc ->
ranked_answer_value = get_field(changeset, :value)

if Enum.member?(possible_answers, ranked_answer_value) do
Expand Down
2 changes: 1 addition & 1 deletion test/flick_web/live/index_live_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmodule FlickWeb.IndexLiveTest do
expected_welcome_copy =
"Flick is an application that allows you to create ballots that capture ranked votes."

assert element(view, "#welcome-copy") |> render() =~ expected_welcome_copy
assert view |> element("#welcome-copy") |> render() =~ expected_welcome_copy
end

test "contains link to create a ballot", ~M{conn} do
Expand Down

0 comments on commit c11331d

Please sign in to comment.