implemented playerSummary
This commit is contained in:
parent
2be7d2bf1d
commit
4f70c84c6b
|
@ -717,4 +717,5 @@ modifyPlayer f n = map
|
|||
|
||||
-- | Provides a short summary string for a player
|
||||
playerSummary :: Player -> String
|
||||
playerSummary = undefined
|
||||
playerSummary p =
|
||||
p^.pName ++ " (" ++ show (p^.pNumber) ++ ") " ++ p^.pPosition
|
||||
|
|
|
@ -58,6 +58,7 @@ spec = describe "Mtlstats.Types" $ do
|
|||
playerSearchSpec
|
||||
playerSearchExactSpec
|
||||
modifyPlayerSpec
|
||||
playerSummarySpec
|
||||
Menu.spec
|
||||
|
||||
playerSpec :: Spec
|
||||
|
@ -578,6 +579,11 @@ modifyPlayerSpec = describe "modifyPlayer" $ mapM_
|
|||
, ( "Sam", 0, 0, 0 )
|
||||
]
|
||||
|
||||
playerSummarySpec :: Spec
|
||||
playerSummarySpec = describe "playerSummary" $
|
||||
it "should be \"Joe (2) center\"" $
|
||||
playerSummary joe `shouldBe` "Joe (2) center"
|
||||
|
||||
joe :: Player
|
||||
joe = newPlayer 2 "Joe" "center"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user