 
 	describe "getDocUpdates", ->
 		beforeEach ->
-			@updates = ["mock-update"]
+			@results = [
+				{foo: "mock-update", v: 56, meta: {end_ts: 110}},
+				{foo: "mock-update", v: 55, meta: {end_ts: 100}},
+				{foo: "mock-update", v: 42, meta:{end_ts: 90}}
+			]
+			@updates = [
+				{foo: "mock-update", v: 55, meta: {end_ts: 100}},
+				{foo: "mock-update", v: 42, meta:{end_ts: 90}}
+			]
 			@db.docHistory = {}
 			@db.docHistory.find = sinon.stub().returns @db.docHistory
 			@db.docHistory.sort = sinon.stub().returns @db.docHistory
 			@db.docHistory.limit = sinon.stub().returns @db.docHistory
-			@db.docHistory.toArray = sinon.stub().callsArgWith(0, null, @updates)
-
-			@before = Date.now()
+			@db.docHistory.toArray = sinon.stub().callsArgWith(0, null, @results)
+
+			@before = 101
 
 		describe "with a before timestamp", ->
 			beforeEach ->


	describe "getDocUpdates", ->
		beforeEach ->
			@updates = ["mock-update"]
			@db.docHistory = {}
			@db.docHistory.find = sinon.stub().returns @db.docHistory
			@db.docHistory.sort = sinon.stub().returns @db.docHistory
			@db.docHistory.limit = sinon.stub().returns @db.docHistory
			@db.docHistory.toArray = sinon.stub().callsArgWith(0, null, @updates)

			@from = 42
			@to   = 55

					.should.equal true

			it "should call the call back with the updates", ->
				@callback.calledWith(null, @updates_after).should.equal true

		describe "with a limit", ->
			beforeEach ->
