implemented editGoalie

This commit is contained in:
Jonathan Lamothe 2019-11-12 23:48:31 -05:00
parent d1773324d5
commit c24016210c
2 changed files with 8 additions and 1 deletions

View File

@ -96,7 +96,7 @@ editPlayer = progMode .~ EditPlayer newEditPlayerState
-- | Starts the 'Goalie' editing process
editGoalie :: ProgState -> ProgState
editGoalie = undefined
editGoalie = progMode .~ EditGoalie newEditGoalieState
-- | Adds the entered player to the roster
addPlayer :: ProgState -> ProgState

View File

@ -51,6 +51,7 @@ spec = describe "Mtlstats.Actions" $ do
createPlayerSpec
createGoalieSpec
editPlayerSpec
editGoalieSpec
addPlayerSpec
addGoalieSpec
resetCreatePlayerStateSpec
@ -165,6 +166,12 @@ editPlayerSpec = describe "editPlayer" $
s = editPlayer newProgState
in show (s^.progMode) `shouldBe` "EditPlayer"
editGoalieSpec :: Spec
editGoalieSpec = describe "editGoalie" $
it "should change the mode appropriately" $ let
s = editGoalie newProgState
in show (s^.progMode) `shouldBe` "EditGoalie"
addPlayerSpec :: Spec
addPlayerSpec = describe "addPlayer" $ do
let