From 62597317839c7945bfbc4b7a00f55d2db6459ab6 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Fri, 24 Apr 2015 12:53:02 -0400 Subject: Finally put pfifcontractors into git --- tests/HomeTest.hs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/HomeTest.hs (limited to 'tests/HomeTest.hs') diff --git a/tests/HomeTest.hs b/tests/HomeTest.hs new file mode 100644 index 0000000..17c9e6d --- /dev/null +++ b/tests/HomeTest.hs @@ -0,0 +1,24 @@ +module HomeTest + ( homeSpecs + ) where + +import Import +import Yesod.Test + +homeSpecs :: Specs +homeSpecs = + describe "These are some example tests" $ + it "loads the index and checks it looks right" $ do + get_ "/" + statusIs 200 + htmlAllContain "h1" "Hello" + + post "/" $ do + addNonce + fileByLabel "Choose a file" "tests/main.hs" "text/plain" -- talk about self-reference + byLabel "What's on the file?" "Some Content" + + statusIs 200 + htmlCount ".message" 1 + htmlAllContain ".message" "Some Content" + htmlAllContain ".message" "text/plain" -- cgit v1.2.3