From 436cc4a00f78738b4d481b61acdbbda718a93fbc Mon Sep 17 00:00:00 2001 From: "Michael S. Klishin" Date: Mon, 29 Aug 2011 20:51:11 +0400 Subject: [PATCH] Use at least one document with date in the test suite --- test/monger/test/collection.clj | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/monger/test/collection.clj b/test/monger/test/collection.clj index bb864e8..5d98f84 100644 --- a/test/monger/test/collection.clj +++ b/test/monger/test/collection.clj @@ -1,7 +1,7 @@ (set! *warn-on-reflection* true) (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]) (:use [clojure.test])) @@ -213,8 +213,9 @@ (deftest update-document-by-id-without-upsert (let [collection "libraries" doc-id (monger.util/random-uuid) - doc { :data-store "MongoDB", :language "Clojure", :_id doc-id } - modified-doc { :data-store "MongoDB", :language "Erlang", :_id doc-id }] + date (Date.) + 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/insert collection doc) (is (= (doc (monger.collection/find-by-id collection doc-id))))