reference goals and assists by index number, not names

This commit is contained in:
Jonathan Lamothe
2019-09-28 02:09:11 -04:00
parent ac92182b20
commit b8a3af11a1
4 changed files with 20 additions and 30 deletions

View File

@@ -371,8 +371,8 @@ recordGoalAssistsSpec = describe "recordGoalAssists" $ do
= newProgState
& database.dbPlayers .~ [joe, bob, steve, dave]
& progMode.gameStateL
%~ (goalBy .~ "Joe")
. (assistsBy .~ ["Bob", "Steve"])
%~ (goalBy ?~ 0)
. (assistsBy .~ [1, 2])
& recordGoalAssists
mapM_
@@ -399,7 +399,7 @@ recordGoalAssistsSpec = describe "recordGoalAssists" $ do
]
it "should clear the goalBy value" $
ps^.progMode.gameStateL.goalBy `shouldBe` ""
ps^.progMode.gameStateL.goalBy `shouldBe` Nothing
it "should clear the assistsBy list" $
ps^.progMode.gameStateL.assistsBy `shouldBe` []