From 5c62e47de77717cf22ad1beca8ebe81e13734428 Mon Sep 17 00:00:00 2001 From: "Michael S. Klishin" Date: Mon, 16 Apr 2012 01:14:26 +0400 Subject: [PATCH] Add an example that inserts a document with Clojure keywords as values --- test/monger/test/inserting_test.clj | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/monger/test/inserting_test.clj b/test/monger/test/inserting_test.clj index 6d26ce8..65c20b7 100644 --- a/test/monger/test/inserting_test.clj +++ b/test/monger/test/inserting_test.clj @@ -62,6 +62,13 @@ result (mgcol/insert "widgets" doc)] (is (= 5.5 (:ratio (mgcol/find-map-by-id collection id)))))) +(deftest insert-a-document-with-clojure-keyword-in-it + (let [collection "widgets" + id (ObjectId.) + doc { :keyword :kwd "_id" id } + result (mgcol/insert "widgets" doc)] + (is (= (name :kwd) (:keyword (mgcol/find-map-by-id collection id)))))) ; + (defrecord Metrics [rps eps])