From 1fb619d9d5edc1c352e2b72cbf5dfcf5c64d05ff Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Wed, 8 Jan 2014 06:56:28 +0400 Subject: Allow to ask for query count --- tests/Network/KRPCSpec.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/Network/KRPCSpec.hs b/tests/Network/KRPCSpec.hs index 756c6855..e695a646 100644 --- a/tests/Network/KRPCSpec.hs +++ b/tests/Network/KRPCSpec.hs @@ -33,6 +33,15 @@ spec = do query servAddr (Echo int)) `shouldReturn` Echo int + it "count transactions properly" $ do + (withManager opts servAddr handlers $ runReaderT $ do + listen + _ <- query servAddr (Echo (0xabcd :: Int)) + _ <- query servAddr (Echo (0xabcd :: Int)) + getQueryCount + ) + `shouldReturn` 2 + it "throw timeout exception" $ do (withManager opts servAddr handlers $ runReaderT $ do query servAddr (Echo (0xabcd :: Int)) -- cgit v1.2.3