Skip to content

Commit

Permalink
do the right thing to generate the initial ID in playerFuzzer
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Apr 5, 2021
1 parent 59ce847 commit fa58353
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/PlayerTest.elm
Expand Up @@ -20,10 +20,13 @@ roundTripDecoderTest =

playerFuzzer : Fuzzer Player
playerFuzzer =
Fuzz.map4 Player
(nameFuzzer
|> Fuzz.map (Murmur3.hashString 0)
|> Fuzz.map Player.playerIdFromIntForTestOnly
Fuzz.map3
(\name rating matches ->
let
initial =
Player.init name
in
{ initial | rating = rating, matches = matches }
)
nameFuzzer
(Fuzz.intRange 1000 3000)
Expand Down

0 comments on commit fa58353

Please sign in to comment.