Use at least one document with date in the test suite
This commit is contained in:
parent
1ee5436841
commit
436cc4a00f
1 changed files with 4 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
(set! *warn-on-reflection* true)
|
(set! *warn-on-reflection* true)
|
||||||
|
|
||||||
(ns monger.test.collection
|
(ns monger.test.collection
|
||||||
(:import [com.mongodb WriteResult WriteConcern DBCursor DBObject])
|
(:import [com.mongodb WriteResult WriteConcern DBCursor DBObject] [java.util Date])
|
||||||
(:require [monger core collection errors util] [clojure stacktrace])
|
(:require [monger core collection errors util] [clojure stacktrace])
|
||||||
(:use [clojure.test]))
|
(:use [clojure.test]))
|
||||||
|
|
||||||
|
|
@ -213,8 +213,9 @@
|
||||||
(deftest update-document-by-id-without-upsert
|
(deftest update-document-by-id-without-upsert
|
||||||
(let [collection "libraries"
|
(let [collection "libraries"
|
||||||
doc-id (monger.util/random-uuid)
|
doc-id (monger.util/random-uuid)
|
||||||
doc { :data-store "MongoDB", :language "Clojure", :_id doc-id }
|
date (Date.)
|
||||||
modified-doc { :data-store "MongoDB", :language "Erlang", :_id doc-id }]
|
doc { :created-at date, :data-store "MongoDB", :language "Clojure", :_id doc-id }
|
||||||
|
modified-doc { :created-at date, :data-store "MongoDB", :language "Erlang", :_id doc-id }]
|
||||||
(monger.collection/remove collection)
|
(monger.collection/remove collection)
|
||||||
(monger.collection/insert collection doc)
|
(monger.collection/insert collection doc)
|
||||||
(is (= (doc (monger.collection/find-by-id collection doc-id))))
|
(is (= (doc (monger.collection/find-by-id collection doc-id))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue