implemented edit
This commit is contained in:
parent
9980a095ed
commit
a44ecc5e24
|
@ -100,7 +100,7 @@ createGoalie = let
|
|||
|
||||
-- | Launches the edit menu
|
||||
edit :: ProgState -> ProgState
|
||||
edit = undefined
|
||||
edit = progMode .~ EditMenu
|
||||
|
||||
-- | Starts the player editing process
|
||||
editPlayer :: ProgState -> ProgState
|
||||
|
|
|
@ -52,6 +52,7 @@ spec = describe "Mtlstats.Actions" $ do
|
|||
removeCharSpec
|
||||
createPlayerSpec
|
||||
createGoalieSpec
|
||||
editSpec
|
||||
editPlayerSpec
|
||||
editGoalieSpec
|
||||
addPlayerSpec
|
||||
|
@ -198,6 +199,12 @@ createGoalieSpec = describe "createGoalie" $
|
|||
s = createGoalie newProgState
|
||||
in show (s^.progMode) `shouldBe` "CreateGoalie"
|
||||
|
||||
editSpec :: Spec
|
||||
editSpec = describe "edit" $
|
||||
it "should change the mode to EditMenu" $ let
|
||||
ps = edit newProgState
|
||||
in show (ps^.progMode) `shouldBe` "EditMenu"
|
||||
|
||||
editPlayerSpec :: Spec
|
||||
editPlayerSpec = describe "editPlayer" $
|
||||
it "should change the mode appropriately" $ let
|
||||
|
|
Loading…
Reference in New Issue
Block a user