implemented goalieSummary

This commit is contained in:
Jonathan Lamothe 2019-10-30 23:27:38 -04:00
parent 12c8d0bdd6
commit 1c692a21f0
2 changed files with 7 additions and 1 deletions

View File

@ -863,4 +863,4 @@ goalieSearchExact sStr goalies = let
-- | Provides a description string for a 'Goalie' -- | Provides a description string for a 'Goalie'
goalieSummary :: Goalie -> String goalieSummary :: Goalie -> String
goalieSummary = undefined goalieSummary g = g^.gName ++ " (" ++ show (g^.gNumber) ++ ")"

View File

@ -67,6 +67,7 @@ spec = describe "Mtlstats.Types" $ do
addPlayerStatsSpec addPlayerStatsSpec
goalieSearchSpec goalieSearchSpec
goalieSearchExactSpec goalieSearchExactSpec
goalieSummarySpec
Menu.spec Menu.spec
playerSpec :: Spec playerSpec :: Spec
@ -699,6 +700,11 @@ goalieSearchExactSpec = describe "goalieSearchExact" $ do
it "should return Nothing" $ it "should return Nothing" $
goalieSearchExact "Greg" goalies `shouldBe` Nothing goalieSearchExact "Greg" goalies `shouldBe` Nothing
goalieSummarySpec :: Spec
goalieSummarySpec = describe "goalieSummary" $
it "should provide a summary string" $
goalieSummary (newGoalie 2 "Joe") `shouldBe` "Joe (2)"
joe :: Player joe :: Player
joe = newPlayer 2 "Joe" "center" joe = newPlayer 2 "Joe" "center"