 					expect(data).to.equal @fakeResponseData
 					done()
 
-		describe 'when Project.findOne produces an error', ->
-
-			beforeEach ->
-				@Project.findOne.callsArgWith(1, new Error('woops'))
+		describe 'when ProjectGetter.getProject produces an error', ->
+
+			beforeEach ->
+				@ProjectGetter.getProject.callsArgWith(2, new Error('woops'))
 
 			it 'should produce an error', (done) ->
 				@call (err, data) =>

					@handler._findBibDocIds.callCount.should.equal 0
					done()

			it 'should call Project.findOne', (done) ->
				@call (err, data) =>
					@Project.findOne.callCount.should.equal 1
					@Project.findOne.calledWith(_id: @projectId).should.equal true
					done()

			it 'should not call _findBibDocIds', (done) ->

		describe 'when request produces an error', ->

			beforeEach ->
				@ProjectGetter.getProject.callsArgWith(2, null, @fakeProject)
				@handler._isFullIndex.callsArgWith(1, null, false)
				@DocumentUpdaterHandler.flushDocToMongo.callsArgWith(2, null)
				@request.post.callsArgWith(1, new Error('woops'))
