Rename deprecated wasCalled() -> toHaveBeenCalled() in all specs

As well as wasNotCalled(), wasCalledWith(), wasNotCalledWith()
This commit is contained in:
Vojta Jina
2011-05-31 10:32:54 +02:00
parent b2f5299e0e
commit 2e5199997c
10 changed files with 36 additions and 36 deletions

View File

@@ -131,10 +131,10 @@ describe('ValidatorTest', function(){
var spy = jasmine.createSpy();
asynchronous.call(self, "kai", spy);
expect(spy).wasNotCalled();
expect(spy).not.toHaveBeenCalled();
asynchronous.call(self, "misko", spy);
expect(spy).wasCalled();
expect(spy).toHaveBeenCalled();
});
it("should ignore old callbacks, and not remove spinner", function(){
@@ -156,7 +156,7 @@ describe('ValidatorTest', function(){
scope.updateFn = jasmine.createSpy();
scope.name = 'misko';
scope.$eval();
expect(scope.asyncFn).wasCalledWith('misko', scope.asyncFn.mostRecentCall.args[1]);
expect(scope.asyncFn).toHaveBeenCalledWith('misko', scope.asyncFn.mostRecentCall.args[1]);
assertTrue(scope.$element.hasClass('ng-input-indicator-wait'));
scope.asyncFn.mostRecentCall.args[1]('myError', {id: 1234, data:'data'});
assertFalse(scope.$element.hasClass('ng-input-indicator-wait'));