 (s/start-in-memory-datastore!)
 
 (facts "Home url redirects to registration page"
-       (-> (k/session app)
+       (-> (k/session h/app)
            (k/visit "/")
            (k/follow-redirect)
            (page-title-is "Register")
            (page-uri-is "/register")))
 
 (facts "User is returned to same page when email is invalid"
-       (-> (k/session app)
+       (-> (k/session h/app)
            (k/visit "/register")
            (k/fill-in "Email address" "invalid-email")
            (k/press "Create account")

           (selector-has-content [:body] "You are signed in as email@server.com")))

(facts "Not found page is shown for unknown url"
       (-> (k/session app)
           (k/visit "/wrong-url")
           (page-title-is "Error-404")))

           (selector-has-content [:body] "You saved the user")))

(future-facts "User can sign in"
       (-> (k/session h/app)
           (k/visit "/sign-in")
           (k/fill-in :.func--email__input "email@server.com")
           (k/fill-in :.func--password__input "valid-password")
