            (selector-has-content [:body] "You saved the user")))
 
 (future-facts "User can sign in"
-       (-> (k/session app)
+       (-> (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")

           (selector-has-content [:.clj--registration-email__validation] "Enter a valid email address")))

(facts "User is taken to success page when user is successfully created"
       (-> (k/session app)
           (k/visit "/register")
           (k/fill-in :.func--email__input "email@server.com")
           (k/fill-in :.func--password__input "valid-password")

(ns stonecutter.integration.kerodon
  (:require [midje.sweet :refer :all]
            [kerodon.core :as k]
            [stonecutter.handler :as h]
            [stonecutter.storage :as s]
            [stonecutter.logging :as l]
            [stonecutter.view.register :refer [registration-form]] 
            [net.cgrand.enlive-html :as html]))

(l/init-logger!)

(defn page-title [state]
  (-> state :enlive (html/select [:title]) first html/text))

(defn page-title-is [state title]
  (fact {:midje/name "Checking page title:"}
       (page-title state) => title)
  state)

(defn page-uri-is [state uri]
