Commit 6975c449 authored by Robert Knight's avatar Robert Knight Committed by Sheetal Umesh Kumar

Fix incorrect usage of Sinon assertions (#162)

This fixes a couple of incorrect usages of Sinon assertions which
resulted in test failures with the latest patch version of Sinon.

 * assert.calledOnce() only takes one argument

 * Sinon assertions do not take a message argument as Chai assertions
   do. See http://sinonjs.org/docs/#assertions
parent bb71cd77
...@@ -504,7 +504,7 @@ describe 'Guest', -> ...@@ -504,7 +504,7 @@ describe 'Guest', ->
guest.anchor(annotation).then -> guest.anchor(annotation).then ->
assert.equal(guest.anchors.length, 0) assert.equal(guest.anchors.length, 0)
assert.calledOnce(removeHighlights, highlights) assert.calledOnce(removeHighlights)
assert.calledWith(removeHighlights, highlights) assert.calledWith(removeHighlights, highlights)
.then(done, done) .then(done, done)
......
...@@ -152,9 +152,9 @@ describe 'loginForm.Controller', -> ...@@ -152,9 +152,9 @@ describe 'loginForm.Controller', ->
assert.called $timeout assert.called $timeout
$timeout.lastCall.args[0]() $timeout.lastCall.args[0]()
assert.called $scope.form.$setPristine, 'the form is pristine' assert.called $scope.form.$setPristine
assert.deepEqual $scope.model, {}, 'the model is erased' assert.deepEqual $scope.model, {}, 'the model is erased'
assert.called mockFlash.info, 'a flash notification is shown' assert.called mockFlash.info
it 'should not happen if the model is empty', -> it 'should not happen if the model is empty', ->
$scope.model = undefined $scope.model = undefined
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment