packages feed

yesod-core 1.2.6.2 → 1.2.6.3

raw patch · 2 files changed

+10/−2 lines, 2 files

Files

test/YesodCoreTest/Redirect.hs view
@@ -7,7 +7,7 @@  data Y = Y mkYesod "Y" [parseRoutes|-/ RootR GET+/ RootR GET POST /r301 R301 GET /r303 R303 GET /r307 R307 GET@@ -20,6 +20,9 @@ getRootR :: Handler () getRootR = return () +postRootR :: Handler ()+postRootR = return ()+ getR301, getR303, getR307, getRRegular :: Handler () getR301 = redirectWith H.status301 RootR getR303 = redirectWith H.status303 RootR@@ -28,6 +31,11 @@  specs :: Spec specs = describe "Redirect" $ do+    it "no redirect" $ app $ do+      res <- request defaultRequest { pathInfo = [], requestMethod = "POST" }+      assertStatus 200 res+      assertBodyContains "" res+     it "301 redirect" $ app $ do       res <- request defaultRequest { pathInfo = ["r301"] }       assertStatus 301 res
yesod-core.cabal view
@@ -1,5 +1,5 @@ name:            yesod-core-version:         1.2.6.2+version:         1.2.6.3 license:         MIT license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>