implemented goalieSummary
This commit is contained in:
parent
12c8d0bdd6
commit
1c692a21f0
|
@ -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) ++ ")"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user