mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-27 11:32:25 +00:00
Improve ExportsController unit tests
Test the params the handler's called with.
This commit is contained in:
parent
24c479e984
commit
1f976a0e04
1 changed files with 5 additions and 0 deletions
|
@ -34,7 +34,12 @@ describe 'ExportsController', ->
|
|||
|
||||
it 'should ask the handler to perform the export', (done) ->
|
||||
@handler.exportProject = sinon.stub().yields(null, {iAmAnExport: true, v1_id: 897})
|
||||
expected =
|
||||
project_id: project_id
|
||||
user_id: user_id
|
||||
brand_variation_id: brand_variation_id
|
||||
@controller.exportProject @req, send:(body) =>
|
||||
expect(@handler.exportProject.args[0][0]).to.deep.equal expected
|
||||
expect(body).to.deep.equal {export_v1_id: 897}
|
||||
done()
|
||||
|
||||
|
|
Loading…
Reference in a new issue