Cosmetics

This commit is contained in:
Michael Klishin 2014-05-29 00:55:47 +04:00
parent 53ce5808c4
commit cb6210d573

View file

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