File: YesodTest.hs

package info (click to toggle)
haskell-yesod-core 1.6.26.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 672 kB
  • sloc: haskell: 7,833; makefile: 5
file content (18 lines) | stat: -rw-r--r-- 472 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- this is being re-worked into a general-purpose testing module for Yesod apps
module YesodCoreTest.YesodTest
(   yesod
  , parseRoutes, mkYesod, yesodDispatch, renderRoute, Yesod(..)
  , redirect
  , Approot (..)
  , module Network.Wai
  , module Network.Wai.Test
  , module Test.Hspec
) where

import Yesod.Core
import Network.Wai.Test
import Network.Wai
import Test.Hspec

yesod :: YesodDispatch y => y -> Session a -> IO a
yesod app f = toWaiApp app >>= runSession f