From d58568c9d8d0d256ba0e554bcda5b83929d9fcc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Jureti=C4=87?= Date: Fri, 3 Jan 2014 23:28:43 -0300 Subject: [PATCH] Fix AuthCtrl tests with proper asserts --- test/spec/authCtrlSpec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/spec/authCtrlSpec.js b/test/spec/authCtrlSpec.js index 42f5236cf0..f36a72ea58 100644 --- a/test/spec/authCtrlSpec.js +++ b/test/spec/authCtrlSpec.js @@ -22,16 +22,16 @@ describe('Auth Controller', function() { $httpBackend.expectPOST('/api/v2/user/auth/local').respond({id: 'abc', token: 'abc'}); scope.auth(); $httpBackend.flush(); - expect(user.authenticate).to.have.been.calledOnce; - expect($window.alert).to.not.have.been.called; + sinon.assert.calledOnce(user.authenticate); + sinon.assert.notCalled($window.alert); }); it('should not log in users with incorrect uname / pass', function() { $httpBackend.expectPOST('/api/v2/user/auth/local').respond(404, ''); scope.auth(); $httpBackend.flush(); - expect(user.authenticate).to.not.have.been.called; - expect($window.alert).to.have.been.calledOnce; + sinon.assert.notCalled(user.authenticate); + sinon.assert.calledOnce($window.alert); }); });