Skip to content
Browse files

Merge branch 'master' of github.com:CraftsmanGuild/craftsmanguild-web…

…site

Conflicts:
	test/craftsmanguild_noir/test_views.clj
  • Loading branch information...
2 parents fcde6d0 + e7bba1a commit c37290b32740cf73a3f28406077d924c62d9802f @sleepynate sleepynate committed Apr 3, 2012
Showing with 13 additions and 12 deletions.
  1. +2 −2 project.clj
  2. +11 −10 test/craftsmanguild_noir/test_views.clj
View
4 project.clj
@@ -3,8 +3,8 @@
:dependencies [[org.clojure/clojure "1.3.0"]
[noir "1.2.0"]
[congomongo "0.1.7"]]
- :dev-dependencies [[midje "1.3.2-SNAPSHOT"]
- [lein-midje "1.0.8"]
+ :dev-dependencies [[midje "1.3.1"]
+ [lein-midje "1.0.9"]
[com.stuartsierra/lazytest "1.2.3"]]
:repositories {"stuartsierra-releases" "http://stuartsierra.com/maven2"}
:main craftsmanguild-noir.server)
View
21 test/craftsmanguild_noir/test_views.clj
@@ -1,17 +1,18 @@
(ns craftsmanguild-noir.test-views
- (:require [noir.util.test :as noirtests])
- (:use craftsmanguild-noir.views.login
- clojure.test
- midje.sweet))
+ (:require [craftsmanguild-noir.models.mongo.users :as users])
+ (:use clojure.test)
+ (:use midje.sweet)
+ (:use noir.util.test)
+ (:use craftsmanguild-noir.views.login))
-(fact (password-correct "login" "password") => true)
+(fact (password-correct "login" "password") => (true (provided (users/get-user "login") => {:password "password"})))
-(fact (password-correct "login." "password") => false)
+(fact (password-correct "login." "password") => (false (provided (users/get-user "login.") => nil)))
-(fact (password-correct "login" ".password") => false)
+(fact (password-correct "login" ".password") => (false (provided (users/get-user "login") => {:password "password"})))
-(fact (noirtests/send-request [:post "/login"] {"username" "login"
+(fact (send-request [:post "/login"] {"username" "login"
"password" "password"})
=>
- (contains {:status 200}))
-
+ (has-status 200
+ (provided (users/get-user "login") => {:password "password"})))

0 comments on commit c37290b

Please sign in to comment.
Something went wrong with that request. Please try again.