From fdf295fe601f65e167c756d506d4707314d70335 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 20 Mar 2008 07:15:23 +0000 Subject: [PATCH] [gitconv @ Unit test for stats] --- tests/Commands.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/Commands.hs b/tests/Commands.hs index 354ff93..364a2c9 100644 --- a/tests/Commands.hs +++ b/tests/Commands.hs @@ -87,6 +87,7 @@ main = mapM_ (\(n, f) -> f >>= \x -> printf "%-14s: %s\n" n x) tests ,("urlHandlers", testUrlHandlers) ,("password", testPassword) ,("ping", testPing) + ,("stats", testStats) ,("song parsing / incomplete track", testSongParseIncompleteTrack) ,("song parsing / complete track", @@ -519,6 +520,19 @@ testPassword = test_ [("password foo", Right "OK")] (password "foo") testPing = test_ [("ping", Right "OK")] ping +testStats = test [("stats", Right "artists: 1\n\ + \albums: 1\n\ + \songs: 1\n\ + \uptime: 100\n\ + \playtime: 100\n\ + \db_playtime: 100\n\ + \db_update: 10\n\ + \OK")] + (Right Stats { stsArtists = 1, stsAlbums = 1, stsSongs = 1 + , stsUptime = 100, stsPlaytime = 100, stsDbUpdate = 10 + , stsDbPlaytime = 100 }) + stats + -- -- Extensions\/shortcuts -- -- 2.11.4.GIT