Add test.

This commit is contained in:
Shane Kilkelly 2016-01-20 14:02:14 +00:00
parent 0b28e7e964
commit 6cc18cd2fb

View file

@ -71,6 +71,11 @@ describe 'ReferencesSearchHandler', ->
it 'should not produce an error', (done) -> it 'should not produce an error', (done) ->
@handler.indexFile @project_id, @file_id, (err) => @handler.indexFile @project_id, @file_id, (err) =>
expect(err).to.equal null expect(err).to.equal null
@request.post.calledOnce.should.equal true
options = @request.post.firstCall.args[0]
options.json.fullIndex.should.equal false
options.json.referencesUrl.should.not.be.undefined
options.url.should.not.be.undefined
done() done()
describe 'when index operation fails', -> describe 'when index operation fails', ->