implemented startNewGame

This commit is contained in:
Jonathan Lamothe
2019-08-22 01:18:02 -04:00
parent ca60d71006
commit c300542635
5 changed files with 47 additions and 12 deletions

View File

@@ -49,7 +49,17 @@ startNewSeasonSpec = describe "startNewSeason" $ do
s ^. database . dbGames `shouldBe` 0
startNewGameSpec :: Spec
startNewGameSpec = describe "startGame" $ return ()
startNewGameSpec = describe "startNewGame" $ do
let
s = newProgState
& database . dbGames .~ 1
& startNewGame
it "should set the number of games to 0" $
s ^. database . dbGames `shouldBe` 0
it "should set the mode to NewGame" $
s ^. progMode `shouldBe` NewGame newGameState
resetYtdSpec :: Spec
resetYtdSpec = describe "resetYtd" $