implemented selectActivePlayerPrompt

This commit is contained in:
Jonathan Lamothe
2020-04-06 14:46:30 -04:00
parent c20fb30f5b
commit 9b6dfc4be9
3 changed files with 72 additions and 8 deletions

View File

@@ -73,6 +73,7 @@ spec = describe "Mtlstats.Types" $ do
gmsPointsSpec
addGameStatsSpec
playerSearchSpec
activePlayerSearchSpec
playerSearchExactSpec
modifyPlayerSpec
playerSummarySpec
@@ -647,6 +648,19 @@ playerSearchSpec = describe "playerSearch" $ mapM_
, ( "x", [] )
]
activePlayerSearchSpec :: Spec
activePlayerSearchSpec = describe "activePlayerSearch" $ mapM_
(\(sStr, expected) -> context sStr $
it ("should return " ++ show expected) $ let
ps = [joe, bob, steve & pActive .~ False]
in activePlayerSearch sStr ps `shouldBe` expected)
-- search, result
[ ( "joe", [(0, joe)] )
, ( "o", [(0, joe), (1, bob)] )
, ( "e", [(0, joe)] )
, ( "x", [] )
]
playerSearchExactSpec :: Spec
playerSearchExactSpec = describe "playerSearchExact" $ mapM_
(\(sStr, expected) -> context sStr $