Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten committed Mar 2, 2024
1 parent be721e5 commit c70c578
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Test/Controller/AccessDeniedSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ makeApplication :: (?applicationContext :: ApplicationContext) => IO Application
makeApplication = do
store <- Session.mapStore_
let sessionMiddleware :: Middleware = Session.withSession store "SESSION" ?applicationContext.frameworkConfig.sessionCookie ?applicationContext.session
pure (sessionMiddleware (Server.application handleNotFound))
pure (sessionMiddleware $ (Server.application handleNotFound) (\app -> app))

assertAccessDenied :: SResponse -> IO ()
assertAccessDenied response = do
Expand Down
2 changes: 1 addition & 1 deletion Test/Controller/NotFoundSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ makeApplication :: (?applicationContext :: ApplicationContext) => IO Application
makeApplication = do
store <- Session.mapStore_
let sessionMiddleware :: Middleware = Session.withSession store "SESSION" ?applicationContext.frameworkConfig.sessionCookie ?applicationContext.session
pure (sessionMiddleware (Server.application handleNotFound))
pure (sessionMiddleware $ (Server.application handleNotFound) (\app -> app))

assertNotFound :: SResponse -> IO ()
assertNotFound response = do
Expand Down
2 changes: 1 addition & 1 deletion Test/RouterSupportSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ config = do
option (AppPort 8000)

application :: (?applicationContext :: ApplicationContext) => Application
application = Server.application handleNotFound
application = Server.application handleNotFound (\app -> app)

tests :: Spec
tests = beforeAll (mockContextNoDatabase WebApplication config) do
Expand Down
2 changes: 1 addition & 1 deletion Test/SEO/Sitemap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ tests = beforeAll (mockContextNoDatabase WebApplication config) do
describe "SEO" do
describe "Sitemap" do
it "should render a XML Sitemap" $ withContext do
runSession (testGet "/sitemap.xml") (Server.application handleNotFound)
runSession (testGet "/sitemap.xml") (Server.application handleNotFound (\app -> app))
>>= assertSuccess "<?xml version=\"1.0\" encoding=\"UTF-8\"?><urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"><url><loc>http://localhost:8000/test/ShowPost?postId=00000000-0000-0000-0000-000000000000</loc><lastmod>2105-04-16</lastmod><changefreq>hourly</changefreq></url></urlset>"
2 changes: 1 addition & 1 deletion Test/ViewSupportSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ makeApplication :: (?applicationContext :: ApplicationContext) => IO Application
makeApplication = do
store <- Session.mapStore_
let sessionMiddleware :: Middleware = Session.withSession store "SESSION" ?applicationContext.frameworkConfig.sessionCookie ?applicationContext.session
pure (sessionMiddleware (Server.application handleNotFound))
pure (sessionMiddleware $ (Server.application handleNotFound (\app -> app)))

tests :: Spec
tests = beforeAll (mockContextNoDatabase WebApplication config) do
Expand Down

0 comments on commit c70c578

Please sign in to comment.