Use monger.result/ok? and do not compare to `true' here
This commit is contained in:
parent
220efa04a5
commit
c820d5885a
1 changed files with 7 additions and 8 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
(ns monger.test.core
|
(ns monger.test.core
|
||||||
(:require [monger core collection util])
|
(:require [monger core collection util result])
|
||||||
(:import (com.mongodb Mongo DB))
|
(:import (com.mongodb Mongo DB))
|
||||||
(:use [clojure.test]))
|
(:use [clojure.test]))
|
||||||
|
|
||||||
|
|
@ -36,10 +36,9 @@
|
||||||
(deftest issuing-a-command
|
(deftest issuing-a-command
|
||||||
"Some commands require administrative priviledges or complex data / checks or heavily depend on DB version. They will be ommited here."
|
"Some commands require administrative priviledges or complex data / checks or heavily depend on DB version. They will be ommited here."
|
||||||
(let [collection "things"]
|
(let [collection "things"]
|
||||||
(are [a b] (= a (.ok (monger.core/command b)))
|
(doseq [c [{ :profile 1 }
|
||||||
true { :profile 1 }
|
{ :listCommands 1 }
|
||||||
true { :listCommands 1 }
|
{ :dbStats 1 }
|
||||||
true { :dbStats 1 }
|
{ :collstats "things" :scale (* 1024 1024) }
|
||||||
true { :collstats "things" :scale (* 1024 1024) }
|
{ :getLastError 1 }]]
|
||||||
true { :getLastError 1 }
|
(is (monger.result/ok? (monger.core/command c))))))
|
||||||
)))
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue