One more scenario

This commit is contained in:
Michael S. Klishin 2012-03-05 17:21:07 +04:00
parent 19a55b5a5b
commit 35be335a71

View file

@ -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)))))