...and as part of converting an entire map
This commit is contained in:
parent
53854254e4
commit
c2a56cbf77
1 changed files with 4 additions and 2 deletions
|
|
@ -47,11 +47,13 @@
|
||||||
|
|
||||||
|
|
||||||
(deftest convert-map-to-dbobject
|
(deftest convert-map-to-dbobject
|
||||||
(let [input { :int 1, :string "Mongo", :float 22.23 }
|
(let [input { :int 1 :string "Mongo" :float 22.23 :true true :false false }
|
||||||
output ^DBObject (to-db-object input)]
|
output ^DBObject (to-db-object input)]
|
||||||
(is (= 1 (.get output "int")))
|
(is (= 1 (.get output "int")))
|
||||||
(is (= "Mongo" (.get output "string")))
|
(is (= "Mongo" (.get output "string")))
|
||||||
(is (= 22.23 (.get output "float")))))
|
(is (= 22.23 (.get output "float")))
|
||||||
|
(is (true? (.get output "true")))
|
||||||
|
(is (false? (.get output "false")))))
|
||||||
|
|
||||||
|
|
||||||
(deftest convert-nested-map-to-dbobject
|
(deftest convert-nested-map-to-dbobject
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue