changed teamScore to check GameState

This commit is contained in:
Jonathan Lamothe
2019-08-27 11:44:45 -04:00
parent 13d422100b
commit 29459063c8
2 changed files with 9 additions and 11 deletions

View File

@@ -197,16 +197,14 @@ awayScoreLSpec = describe "awayScoreL" $ do
teamScoreSpec :: Spec
teamScoreSpec = describe "teamScore" $ do
let
m t = NewGame $ newGameState
s t = newGameState
& gameType ?~ t
& homeScore ?~ 1
& awayScore ?~ 2
s t = newProgState
& progMode .~ m t
context "unexpected state" $
context "unknown game type" $
it "should return Nothing" $
teamScore newProgState `shouldBe` Nothing
teamScore newGameState `shouldBe` Nothing
context "HomeGame" $
it "should return 1" $