 		describe 'when request responds with error status', ->
 
 			beforeEach ->
-				@Project.findOne.callsArgWith(1, null, @fakeProject)
+				@ProjectGetter.getProject.callsArgWith(2, null, @fakeProject)
 				@handler._isFullIndex.callsArgWith(1, null, false)
 				@request.post.callsArgWith(1, null, {statusCode: 500}, null)
 

		describe 'when _isFullIndex produces an error', ->

			beforeEach ->
				@Project.findOne.callsArgWith(1, null, @fakeProject)
				@handler._isFullIndex.callsArgWith(1, new Error('woops'))

			it 'should produce an error', (done) ->

		describe 'when flushDocToMongo produces an error', ->

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

