Skip to content

Commit 5a2df4b

Browse files
fix variable name
1 parent 42a09fc commit 5a2df4b

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

test/pointing_party/vote_calculator_test.exs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,19 @@ defmodule PointingParty.VoteCalculatorTest do
1111
metas: list_of(points_map, length: 1)
1212
})
1313

14-
user = nonempty(map_of(string(:alphanumeric), metas_map))
15-
[user: user]
14+
users = nonempty(map_of(string(:alphanumeric), metas_map))
15+
[users: users]
1616
end
1717

18-
property "winning value is a list or a integer", %{user: user} do
19-
check all users <- user do
18+
property "winning value is a list or a integer", %{users: users} do
19+
check all users <- users do
2020
{_event, winner} = PointingParty.VoteCalculator.calculate_votes(users)
2121
assert is_list(winner) || is_integer(winner)
2222
end
2323
end
2424

25-
property "tie when winning value is a list, winner when winning value is an integer", %{
26-
user: user
27-
} do
28-
check all users <- user do
25+
property "tie when winning value is a list, winner when winning value is an integer", %{users: users} do
26+
check all users <- users do
2927
{event, winner} = PointingParty.VoteCalculator.calculate_votes(users)
3028

3129
cond do
@@ -38,8 +36,8 @@ defmodule PointingParty.VoteCalculatorTest do
3836
end
3937
end
4038

41-
property "the winning value is not more than the highest point value", %{user: user} do
42-
check all users <- user do
39+
property "the winning value is not more than the highest point value", %{users: users} do
40+
check all users <- users do
4341
{_event, winner} = PointingParty.VoteCalculator.calculate_votes(users)
4442

4543
max_vote =
@@ -57,8 +55,8 @@ defmodule PointingParty.VoteCalculatorTest do
5755
end
5856
end
5957

60-
property "when the winner is a list of two sorted values", %{user: user} do
61-
check all users <- user do
58+
property "when the winner is a list of two sorted values", %{users: users} do
59+
check all users <- users do
6260
{_event, winner} = PointingParty.VoteCalculator.calculate_votes(users)
6361

6462
if is_list(winner) do

0 commit comments

Comments
 (0)