From 5473ff10ba14574aea2979852ee16f0a83115fc2 Mon Sep 17 00:00:00 2001 From: "Michael S. Klishin" Date: Mon, 29 Aug 2011 20:53:30 +0400 Subject: [PATCH] Refactor to use monger.collection/insert-batch here --- test/monger/test/collection.clj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/monger/test/collection.clj b/test/monger/test/collection.clj index 5d98f84..be805df 100644 --- a/test/monger/test/collection.clj +++ b/test/monger/test/collection.clj @@ -33,7 +33,7 @@ ;; -;; insert +;; insert-batch ;; (deftest insert-a-batch-of-basic-documents-without-ids-and-with-default-write-concern @@ -61,10 +61,10 @@ (let [collection "things"] (monger.collection/remove collection) (is (= 0 (monger.collection/count collection))) - (monger.collection/insert collection { :language "Clojure", :name "monger" }) - (monger.collection/insert collection { :language "Clojure", :name "langohr" }) - (monger.collection/insert collection { :language "Clojure", :name "incanter" }) - (monger.collection/insert collection { :language "Scala", :name "akka" }) + (monger.collection/insert-batch collection [{ :language "Clojure", :name "langohr" }, + { :language "Clojure", :name "monger" }, + { :language "Clojure", :name "incanter" }, + { :language "Scala", :name "akka" }] ) (is (= 4 (monger.collection/count collection))) (is (= 3 (monger.collection/count collection { :language "Clojure" }))) (is (= 1 (monger.collection/count collection { :language "Scala" })))