mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Fix scope not being applied through callback
This commit is contained in:
parent
136fd84810
commit
abf53625fe
1 changed files with 3 additions and 3 deletions
|
@ -13,12 +13,12 @@ define ['ide/editor/directives/cmEditor'], () ->
|
|||
}
|
||||
|
||||
it 'inits Rich Text', () ->
|
||||
inject ($compile, $rootScope) ->
|
||||
inject ($compile, $rootScope) =>
|
||||
$compile('<div cm-editor></div>')($rootScope)
|
||||
expect(@richTextInit).to.have.been.called
|
||||
|
||||
it 'attaches to CM', () ->
|
||||
inject ($compile, $rootScope, $browser) ->
|
||||
inject ($compile, $rootScope, $browser) =>
|
||||
getSnapshot = sinon.stub()
|
||||
detachFromCM = sinon.stub()
|
||||
attachToCM = sinon.stub()
|
||||
|
@ -40,7 +40,7 @@ define ['ide/editor/directives/cmEditor'], () ->
|
|||
expect(attachToCM).to.have.been.called
|
||||
|
||||
it 'detaches from CM when destroyed', () ->
|
||||
inject ($compile, $rootScope) ->
|
||||
inject ($compile, $rootScope) =>
|
||||
@richTextInit.returns({ setValue: sinon.stub() })
|
||||
detachFromCM = sinon.stub()
|
||||
$rootScope.sharejsDoc = {
|
||||
|
|
Loading…
Reference in a new issue