From c70c578682a6a3c800d637ad24c184d53d3568c2 Mon Sep 17 00:00:00 2001 From: Marc Scholten Date: Sat, 2 Mar 2024 22:19:12 +0100 Subject: [PATCH] Fixed tests --- Test/Controller/AccessDeniedSpec.hs | 2 +- Test/Controller/NotFoundSpec.hs | 2 +- Test/RouterSupportSpec.hs | 2 +- Test/SEO/Sitemap.hs | 2 +- Test/ViewSupportSpec.hs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Test/Controller/AccessDeniedSpec.hs b/Test/Controller/AccessDeniedSpec.hs index 8a847540c..34ca74011 100644 --- a/Test/Controller/AccessDeniedSpec.hs +++ b/Test/Controller/AccessDeniedSpec.hs @@ -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 diff --git a/Test/Controller/NotFoundSpec.hs b/Test/Controller/NotFoundSpec.hs index 2c526db25..3448c5cec 100644 --- a/Test/Controller/NotFoundSpec.hs +++ b/Test/Controller/NotFoundSpec.hs @@ -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 diff --git a/Test/RouterSupportSpec.hs b/Test/RouterSupportSpec.hs index 09a4c0158..bac750f42 100644 --- a/Test/RouterSupportSpec.hs +++ b/Test/RouterSupportSpec.hs @@ -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 diff --git a/Test/SEO/Sitemap.hs b/Test/SEO/Sitemap.hs index 82155b618..ed85c1d1b 100644 --- a/Test/SEO/Sitemap.hs +++ b/Test/SEO/Sitemap.hs @@ -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 "http://localhost:8000/test/ShowPost?postId=00000000-0000-0000-0000-0000000000002105-04-16hourly" diff --git a/Test/ViewSupportSpec.hs b/Test/ViewSupportSpec.hs index 8911230cd..f5fe528d7 100644 --- a/Test/ViewSupportSpec.hs +++ b/Test/ViewSupportSpec.hs @@ -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