implemented editGoalieLtGoals
This commit is contained in:
@@ -41,6 +41,7 @@ spec = describe "EditGoalie" $ do
|
||||
editGoalieYtdTiesSpec
|
||||
editGoalieLtGamesSpec
|
||||
editGoalieLtMinsSpec
|
||||
editGoalieLtGoalsSpec
|
||||
|
||||
editGoalieNumberSpec :: Spec
|
||||
editGoalieNumberSpec = describe "editGoalieNumber" $ editTest
|
||||
@@ -352,6 +353,37 @@ editGoalieLtMinsSpec = describe "editGoalieLtMins" $ editTest
|
||||
)
|
||||
]
|
||||
|
||||
editGoalieLtGoalsSpec :: Spec
|
||||
editGoalieLtGoalsSpec = describe "editGoalieLtGoals" $ editTest
|
||||
(editGoalieLtGoals 1)
|
||||
EGLtGoals
|
||||
(\(num, name, goals) -> newGoalie num name & gLifetime.gsGoalsAllowed .~ goals)
|
||||
[ ( "set Joe"
|
||||
, Just 0
|
||||
, ( 2, "Joe", 1 )
|
||||
, ( 3, "Bob", 0 )
|
||||
, EGLifetime
|
||||
)
|
||||
, ( "set Bob"
|
||||
, Just 1
|
||||
, ( 2, "Joe", 0 )
|
||||
, ( 3, "Bob", 1 )
|
||||
, EGLifetime
|
||||
)
|
||||
, ( "out of bounds"
|
||||
, Just 2
|
||||
, ( 2, "Joe", 0 )
|
||||
, ( 3, "Bob", 0 )
|
||||
, EGLtGoals
|
||||
)
|
||||
, ( "no goalie selected"
|
||||
, Nothing
|
||||
, ( 2, "Joe", 0 )
|
||||
, ( 3, "Bob", 0 )
|
||||
, EGLtGoals
|
||||
)
|
||||
]
|
||||
|
||||
editTest
|
||||
:: (ProgState -> ProgState)
|
||||
-> EditGoalieMode
|
||||
|
||||
Reference in New Issue
Block a user