aboutsummaryrefslogtreecommitdiffstats
path: root/test/BrowserSpecs.js
diff options
context:
space:
mode:
authorVojta Jina2011-05-31 10:32:54 +0200
committerVojta Jina2011-05-31 10:32:54 +0200
commit2e5199997c77cb2febed4ff21bc12a5d5fbad4ce (patch)
treeda57107e2e07e5d160af0383cbd86ee2fbc94c80 /test/BrowserSpecs.js
parentb2f5299e0e3d6e4892b7fcc37686012147bf0afa (diff)
downloadangular.js-2e5199997c77cb2febed4ff21bc12a5d5fbad4ce.tar.bz2
Rename deprecated wasCalled() -> toHaveBeenCalled() in all specs
As well as wasNotCalled(), wasCalledWith(), wasNotCalledWith()
Diffstat (limited to 'test/BrowserSpecs.js')
-rw-r--r--test/BrowserSpecs.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/BrowserSpecs.js b/test/BrowserSpecs.js
index 45e5f6be..635909a7 100644
--- a/test/BrowserSpecs.js
+++ b/test/BrowserSpecs.js
@@ -59,18 +59,18 @@ describe('browser', function(){
it('should process callbacks immedietly with no outstanding requests', function(){
var callback = jasmine.createSpy('callback');
browser.notifyWhenNoOutstandingRequests(callback);
- expect(callback).wasCalled();
+ expect(callback).toHaveBeenCalled();
});
it('should queue callbacks with outstanding requests', function(){
var callback = jasmine.createSpy('callback');
browser.xhr('GET', '/url', null, noop);
browser.notifyWhenNoOutstandingRequests(callback);
- expect(callback).not.wasCalled();
+ expect(callback).not.toHaveBeenCalled();
xhr.readyState = 4;
xhr.onreadystatechange();
- expect(callback).wasCalled();
+ expect(callback).toHaveBeenCalled();
});
});
@@ -83,7 +83,7 @@ describe('browser', function(){
log += code + ':' + data + ';';
});
browser.notifyWhenNoOutstandingRequests(callback);
- expect(callback).not.wasCalled();
+ expect(callback).not.toHaveBeenCalled();
expect(scripts.length).toEqual(1);
var script = scripts[0];
script.remove = function(){
@@ -93,7 +93,7 @@ describe('browser', function(){
expect(url[0]).toEqual('http://example.org/path');
expect(typeof fakeWindow[url[1]]).toEqual($function);
fakeWindow[url[1]]('data');
- expect(callback).wasCalled();
+ expect(callback).toHaveBeenCalled();
expect(log).toEqual('remove();200:data;');
expect(typeof fakeWindow[url[1]]).toEqual('undefined');
});
@@ -172,10 +172,10 @@ describe('browser', function(){
it('should update outstandingRequests counter', function() {
var callback = jasmine.createSpy('callback');
browser.defer(callback);
- expect(callback).not.wasCalled();
+ expect(callback).not.toHaveBeenCalled();
fakeSetTimeout.flush();
- expect(callback).wasCalled();
+ expect(callback).toHaveBeenCalled();
});
});