Merge remote-tracking branch 'origin/sk-admin-panel-projects'
GitOrigin-RevId: 56f17fe3bec6252bd3d933899e540813550a36ff
This commit is contained in:
committed by
sharelatex
parent
bd9adbae52
commit
d2bccbec25
@@ -1,5 +1,6 @@
|
||||
sinon = require('sinon')
|
||||
chai = require('chai')
|
||||
expect = chai.expect
|
||||
should = chai.should()
|
||||
modulePath = "../../../../app/js/Features/Project/ProjectOptionsHandler.js"
|
||||
SandboxedModule = require('sandboxed-module')
|
||||
@@ -97,3 +98,12 @@ describe 'ProjectOptionsHandler', ->
|
||||
@handler.setBrandVariationId project_id, "", (err)=>
|
||||
@projectModel.update.called.should.equal false
|
||||
done()
|
||||
|
||||
describe "unsetting the brandVariationId", ->
|
||||
it 'should perform and update on mongo', (done)->
|
||||
@handler.unsetBrandVariationId project_id, (err)=>
|
||||
args = @projectModel.update.args[0]
|
||||
args[0]._id.should.equal project_id
|
||||
expect(args[1]).to.deep.equal {$unset: {brandVariationId: 1}}
|
||||
done()
|
||||
@projectModel.update.args[0][3]()
|
||||
|
||||
Reference in New Issue
Block a user