Fix unit tests

This commit is contained in:
Dušan Juretić
2013-12-23 22:38:15 -03:00
parent faeeecdf04
commit 6ab10f9f3d
4 changed files with 8 additions and 7 deletions

View File

@@ -19,7 +19,7 @@ describe('Auth Controller', function() {
}));
it('should log in users with correct uname / pass', function() {
$httpBackend.expectPOST('/api/v1/user/auth/local').respond({id: 'abc', token: 'abc'});
$httpBackend.expectPOST('/api/v2/user/auth/local').respond({id: 'abc', token: 'abc'});
scope.auth();
$httpBackend.flush();
expect(user.authenticate).to.have.been.calledOnce;
@@ -27,7 +27,7 @@ describe('Auth Controller', function() {
});
it('should not log in users with incorrect uname / pass', function() {
$httpBackend.expectPOST('/api/v1/user/auth/local').respond(404, '');
$httpBackend.expectPOST('/api/v2/user/auth/local').respond(404, '');
scope.auth();
$httpBackend.flush();
expect(user.authenticate).to.not.have.been.called;