One more scenario
This commit is contained in:
parent
19a55b5a5b
commit
35be335a71
1 changed files with 9 additions and 1 deletions
|
|
@ -1,7 +1,8 @@
|
|||
(ns monger.test.factory-dsl
|
||||
(:use [clojure.test]
|
||||
[monger.testing]
|
||||
[clj-time.core :only [days ago weeks]]))
|
||||
[clj-time.core :only [days ago weeks]])
|
||||
(:import [org.bson.types ObjectId]))
|
||||
|
||||
(defaults-for "domains"
|
||||
:ipv6-enabled false)
|
||||
|
|
@ -16,4 +17,11 @@
|
|||
(is (:_id doc))
|
||||
(is (= t (:created-at doc)))
|
||||
(is (= "clojure.org" (:name doc)))
|
||||
(is (false? (:ipv6-enabled doc)))))
|
||||
|
||||
(deftest test-building-documents-from-a-factory-case-2
|
||||
(let [oid (ObjectId.)
|
||||
doc (build "domains" "clojure.org" :_id oid)]
|
||||
(is (= oid (:_id doc)))
|
||||
(is (= "clojure.org" (:name doc)))
|
||||
(is (false? (:ipv6-enabled doc)))))
|
||||
Loading…
Reference in a new issue