Cosmetics
This commit is contained in:
parent
53ce5808c4
commit
cb6210d573
1 changed files with 87 additions and 87 deletions
|
|
@ -1,10 +1,10 @@
|
|||
(ns monger.test.atomic-modifiers-test
|
||||
(:import [com.mongodb WriteResult WriteConcern DBObject]
|
||||
[org.bson.types ObjectId]
|
||||
org.bson.types.ObjectId
|
||||
java.util.Date)
|
||||
(:require [monger.core :as mg]
|
||||
[monger.collection :as mc]
|
||||
[monger.result :as mgres]
|
||||
[monger.result :refer [ok?]]
|
||||
[clojure.test :refer :all]
|
||||
[monger.operators :refer :all]))
|
||||
|
||||
|
|
@ -124,7 +124,7 @@
|
|||
(let [coll "docs"
|
||||
oid (ObjectId.)]
|
||||
(mc/insert db coll {:_id oid :title "Document 1" :published true})
|
||||
(is (mgres/ok? (mc/update db coll { :_id oid } { $unset { :published 1 :featured true } })))
|
||||
(is (ok? (mc/update db coll {:_id oid} {$unset {:published 1 :featured true}})))
|
||||
(is (= {:_id oid :title "Document 1"}
|
||||
(mc/find-map-by-id db coll oid)))))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue