From abf53625fe7972009562acece4fd6d14db671d86 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Mon, 26 Feb 2018 14:02:08 +0000 Subject: [PATCH] Fix scope not being applied through callback --- .../coffee/ide/editor/directives/cmEditorTests.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/test/unit_frontend/coffee/ide/editor/directives/cmEditorTests.coffee b/services/web/test/unit_frontend/coffee/ide/editor/directives/cmEditorTests.coffee index 1200d6105c..f7667e74cc 100644 --- a/services/web/test/unit_frontend/coffee/ide/editor/directives/cmEditorTests.coffee +++ b/services/web/test/unit_frontend/coffee/ide/editor/directives/cmEditorTests.coffee @@ -13,12 +13,12 @@ define ['ide/editor/directives/cmEditor'], () -> } it 'inits Rich Text', () -> - inject ($compile, $rootScope) -> + inject ($compile, $rootScope) => $compile('
')($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 = {