mark rookies in goalieSummary

This commit is contained in:
Jonathan Lamothe 2020-01-08 23:54:16 -05:00
parent 5209c4a296
commit ee3cea5643
2 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,7 @@ goalieDetails :: Goalie -> String
goalieDetails g = let goalieDetails g = let
header = unlines $ labelTable header = unlines $ labelTable
[ ( "Number", show $ g^.gNumber ) [ ( "Number", show $ g^.gNumber )
, ( "Name", g^.gName ) , ( "Name", goalieName g )
] ]
body = unlines $ numTable ["YTD", "Lifetime"] $ map body = unlines $ numTable ["YTD", "Lifetime"] $ map

View File

@ -35,6 +35,7 @@ spec = describe "Goalie" $ do
goalieDetailsSpec :: Spec goalieDetailsSpec :: Spec
goalieDetailsSpec = describe "goalieDetails" $ let goalieDetailsSpec = describe "goalieDetails" $ let
input = newGoalie 1 "Joe" input = newGoalie 1 "Joe"
& gRookie .~ True
& gYtd & gYtd
%~ ( gsGames .~ 2 ) %~ ( gsGames .~ 2 )
. ( gsMinsPlayed .~ 3 ) . ( gsMinsPlayed .~ 3 )
@ -54,7 +55,7 @@ goalieDetailsSpec = describe "goalieDetails" $ let
expected = unlines expected = unlines
[ "Number: 1" [ "Number: 1"
, " Name: Joe" , " Name: Joe*"
, "" , ""
, " YTD Lifetime" , " YTD Lifetime"
, " Games played 2 9" , " Games played 2 9"