Skip to content

Commit

Permalink
Updated for aeson-0.9.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
grayjay committed May 28, 2015
1 parent ef856a8 commit 67b31fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 3 additions & 4 deletions json-rpc-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
-- documentation, see http://haskell.org/cabal/users-guide/

name: json-rpc-server
version: 0.1.5.0
version: 0.1.6.0
license: MIT
license-file: LICENSE
category: Network, JSON
maintainer: Kristen Kozak <[email protected]>
synopsis: JSON-RPC 2.0 on the server side.
build-type: Simple
extra-source-files: README.md
cabal-version: >=1.8
tested-with: GHC == 7.0.1, GHC == 7.4.1, GHC == 7.6.2,
GHC == 7.6.3, GHC == 7.8.3, GHC == 7.10.1
Expand All @@ -36,7 +35,7 @@ library
exposed-modules: Network.JsonRpc.Server
other-modules: Network.JsonRpc.Types
build-depends: base >=4.3 && <4.9,
aeson >=0.6 && <0.9,
aeson >=0.6 && <0.10,
deepseq >= 1.1 && <1.5,
bytestring >=0.9 && <0.11,
mtl >=1.1.1 && <2.3,
Expand Down Expand Up @@ -67,7 +66,7 @@ test-suite tests
HUnit >=1.2 && <1.3,
test-framework >=0.7 && <0.9,
test-framework-hunit >=0.3 && <0.4,
aeson >=0.6 && <0.9,
aeson >=0.6 && <0.10,
bytestring >=0.9 && <0.11,
mtl >=1.1.1 && <2.3,
text >=0.11 && <1.3,
Expand Down
4 changes: 3 additions & 1 deletion tests/TestSuite.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import qualified Data.Aeson as A
import Data.Aeson ((.=))
import qualified Data.Aeson.Types as A
import qualified Data.HashMap.Strict as H
import qualified Data.ByteString.Lazy.Char8 as LB
import Control.Monad.Trans (liftIO)
import Control.Monad.State (State, runState, lift, modify)
import Control.Monad.Identity (Identity, runIdentity)
Expand All @@ -34,7 +35,8 @@ main = defaultMain $ errorHandlingTests ++ otherTests

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

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

0 comments on commit 67b31fc

Please sign in to comment.