Skip to content

Commit 67b31fc

Browse files
committed
Updated for aeson-0.9.0.1
1 parent ef856a8 commit 67b31fc

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

json-rpc-server.cabal

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
-- documentation, see http://haskell.org/cabal/users-guide/
33

44
name: json-rpc-server
5-
version: 0.1.5.0
5+
version: 0.1.6.0
66
license: MIT
77
license-file: LICENSE
88
category: Network, JSON
99
maintainer: Kristen Kozak <[email protected]>
1010
synopsis: JSON-RPC 2.0 on the server side.
1111
build-type: Simple
12-
extra-source-files: README.md
1312
cabal-version: >=1.8
1413
tested-with: GHC == 7.0.1, GHC == 7.4.1, GHC == 7.6.2,
1514
GHC == 7.6.3, GHC == 7.8.3, GHC == 7.10.1
@@ -36,7 +35,7 @@ library
3635
exposed-modules: Network.JsonRpc.Server
3736
other-modules: Network.JsonRpc.Types
3837
build-depends: base >=4.3 && <4.9,
39-
aeson >=0.6 && <0.9,
38+
aeson >=0.6 && <0.10,
4039
deepseq >= 1.1 && <1.5,
4140
bytestring >=0.9 && <0.11,
4241
mtl >=1.1.1 && <2.3,
@@ -67,7 +66,7 @@ test-suite tests
6766
HUnit >=1.2 && <1.3,
6867
test-framework >=0.7 && <0.9,
6968
test-framework-hunit >=0.3 && <0.4,
70-
aeson >=0.6 && <0.9,
69+
aeson >=0.6 && <0.10,
7170
bytestring >=0.9 && <0.11,
7271
mtl >=1.1.1 && <2.3,
7372
text >=0.11 && <1.3,

tests/TestSuite.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import qualified Data.Aeson as A
1717
import Data.Aeson ((.=))
1818
import qualified Data.Aeson.Types as A
1919
import qualified Data.HashMap.Strict as H
20+
import qualified Data.ByteString.Lazy.Char8 as LB
2021
import Control.Monad.Trans (liftIO)
2122
import Control.Monad.State (State, runState, lift, modify)
2223
import Control.Monad.Identity (Identity, runIdentity)
@@ -34,7 +35,8 @@ main = defaultMain $ errorHandlingTests ++ otherTests
3435

3536
errorHandlingTests :: [Test]
3637
errorHandlingTests = [ testCase "invalid JSON" $
37-
assertSubtractResponse (A.String "5") $ nullIdErrRsp (-32700)
38+
let rsp = runIdentity $ S.call (S.toMethods []) $ LB.pack "{"
39+
in removeErrMsg <$> (A.decode =<< rsp) @?= Just (nullIdErrRsp (-32700))
3840

3941
, testCase "invalid JSON-RPC" $
4042
assertSubtractResponse (A.object ["id" .= A.Number 10]) $ nullIdErrRsp (-32600)

0 commit comments

Comments
 (0)