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'
|
||||
goalieSummary :: Goalie -> String
|
||||
goalieSummary = undefined
|
||||
goalieSummary g = g^.gName ++ " (" ++ show (g^.gNumber) ++ ")"
|
||||
|
|
|
@ -67,6 +67,7 @@ spec = describe "Mtlstats.Types" $ do
|
|||
addPlayerStatsSpec
|
||||
goalieSearchSpec
|
||||
goalieSearchExactSpec
|
||||
goalieSummarySpec
|
||||
Menu.spec
|
||||
|
||||
playerSpec :: Spec
|
||||
|
@ -699,6 +700,11 @@ goalieSearchExactSpec = describe "goalieSearchExact" $ do
|
|||
it "should return 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 = newPlayer 2 "Joe" "center"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user