on master help sign in
Fix tests for ssAddTrailingSlash
commit2adcd6c05f98f768050c8275c15582dd6748089e authorMichael Snoyman <michael@fpcomplete.com> dateTue 21 Jul 2015, 01:58 (11 years ago) parentf0caeb2
1 file changed+6−2
wai-app-static/test/WaiAppStaticTest.hs+6−2
wai-app-static/test/WaiAppStaticTest.hs+6−2
@@ -25,7 +25,9 @@ defRequest = defaultRequest
2525spec :: Spec
2626spec = do
2727 let webApp = flip runSession $ staticApp $ defaultWebAppSettings "test"
28− let fileServerApp = flip runSession $ staticApp $ defaultFileServerSettings "test"
28+ let fileServerApp = flip runSession $ staticApp (defaultFileServerSettings "test")
29+ { ssAddTrailingSlash = True
30+ }
2931
3032 let etag = "1B2M2Y8AsgTpgAmY7PhCfg=="
3133 let file = "a/b"
@@ -134,7 +136,9 @@ spec = do
134136 case pathInfo req of
135137 "subPath":rest ->
136138 let req' = req { pathInfo = rest }
137− in (staticApp $ defaultFileServerSettings "test") req' send
139+ in (staticApp (defaultFileServerSettings "test")
140+ { ssAddTrailingSlash = True
141+ }) req' send
138142 _ -> send $ responseLBS status500 []
139143 "urlMapApp: only works at subPath"
140144 it "works with subpath at the root of the file server" $ urlMapApp $ do