diff --git a/src/Mtlstats/Helpers/Goalie.hs b/src/Mtlstats/Helpers/Goalie.hs index fb5818d..9c3f9dd 100644 --- a/src/Mtlstats/Helpers/Goalie.hs +++ b/src/Mtlstats/Helpers/Goalie.hs @@ -31,7 +31,7 @@ goalieDetails :: Goalie -> String goalieDetails g = let header = unlines $ labelTable [ ( "Number", show $ g^.gNumber ) - , ( "Name", g^.gName ) + , ( "Name", goalieName g ) ] body = unlines $ numTable ["YTD", "Lifetime"] $ map diff --git a/test/Helpers/GoalieSpec.hs b/test/Helpers/GoalieSpec.hs index 5c784f1..e63ac7e 100644 --- a/test/Helpers/GoalieSpec.hs +++ b/test/Helpers/GoalieSpec.hs @@ -35,6 +35,7 @@ spec = describe "Goalie" $ do goalieDetailsSpec :: Spec goalieDetailsSpec = describe "goalieDetails" $ let input = newGoalie 1 "Joe" + & gRookie .~ True & gYtd %~ ( gsGames .~ 2 ) . ( gsMinsPlayed .~ 3 ) @@ -54,7 +55,7 @@ goalieDetailsSpec = describe "goalieDetails" $ let expected = unlines [ "Number: 1" - , " Name: Joe" + , " Name: Joe*" , "" , " YTD Lifetime" , " Games played 2 9"