Skip to content

Instantly share code, notes, and snippets.

@k-bx

k-bx/errors Secret

Created Jun 25, 2013
Embed
What would you like to do?
strange errors in haskell
tests/EntitiesTest.hs:16:9:
No instance for (Yesod.Core.Handler.RedirectUrl
site0 (yesod-routes-1.2.0.1:Yesod.Routes.Class.Route App))
arising from a use of `get'
Possible fix:
add an instance declaration for
(Yesod.Core.Handler.RedirectUrl
site0 (yesod-routes-1.2.0.1:Yesod.Routes.Class.Route App))
In a stmt of a 'do' block: get EntriesR
In the second argument of `($)', namely
`do { get EntriesR;
statusIs 200;
maybeResponse <- getResponse;
let response = fromJust maybeResponse;
.... }'
In a stmt of a 'do' block:
yit "gets empty list of entries"
$ do { get EntriesR;
statusIs 200;
maybeResponse <- getResponse;
let response = fromJust maybeResponse;
.... }
tests/EntitiesTest.hs:22:53:
Couldn't match expected type `Maybe [EntryPresentation]'
with actual type `[a0]'
In the third argument of `assertEqual', namely `[]'
In a stmt of a 'do' block:
assertEqual "decoded list is empty" decoded []
In the second argument of `($)', namely
`do { get EntriesR;
statusIs 200;
maybeResponse <- getResponse;
let response = fromJust maybeResponse;
.... }'
entitiesSpecs :: Spec
entitiesSpecs =
ydescribe "/entries/ API tests" $ do
yit "gets empty list of entries" $ do
get EntriesR
statusIs 200
maybeResponse <- getResponse
let response = fromJust maybeResponse
let body = simpleBody response
let decoded = decode body :: Maybe [EntryPresentation]
assertEqual "decoded list is empty" (fromJust decoded) []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.