aboutsummaryrefslogtreecommitdiffstats
path: root/test/service
diff options
context:
space:
mode:
authorIgor Minar2011-07-17 00:47:11 -0700
committerIgor Minar2011-07-18 12:12:54 -0700
commit4c6d26a38f977f61d4deaacfd6b6c71f331e8065 (patch)
treefc291897c2e61097f2cabdf1963ed752704fd24a /test/service
parentc43ce91b2534fe36994fd74cf8d159e54909d8ca (diff)
downloadangular.js-4c6d26a38f977f61d4deaacfd6b6c71f331e8065.tar.bz2
fix(strict mode): fix all issues discovered by strict mode and unit/e2e tests
Diffstat (limited to 'test/service')
-rw-r--r--test/service/deferSpec.js16
-rw-r--r--test/service/xhr.cacheSpec.js12
2 files changed, 14 insertions, 14 deletions
diff --git a/test/service/deferSpec.js b/test/service/deferSpec.js
index bd8fe7d7..21b8bf9c 100644
--- a/test/service/deferSpec.js
+++ b/test/service/deferSpec.js
@@ -40,31 +40,31 @@ describe('$defer', function() {
it('should call eval after each callback is executed', function() {
- var eval = this.spyOn(scope, '$eval').andCallThrough();
+ var evalSpy = this.spyOn(scope, '$eval').andCallThrough();
$defer(function() {});
- expect(eval).not.toHaveBeenCalled();
+ expect(evalSpy).not.toHaveBeenCalled();
$browser.defer.flush();
- expect(eval).toHaveBeenCalled();
+ expect(evalSpy).toHaveBeenCalled();
- eval.reset(); //reset the spy;
+ evalSpy.reset(); //reset the spy;
$defer(function() {});
$defer(function() {});
$browser.defer.flush();
- expect(eval.callCount).toBe(2);
+ expect(evalSpy.callCount).toBe(2);
});
it('should call eval even if an exception is thrown in callback', function() {
- var eval = this.spyOn(scope, '$eval').andCallThrough();
+ var evalSpy = this.spyOn(scope, '$eval').andCallThrough();
$defer(function() {throw "Test Error";});
- expect(eval).not.toHaveBeenCalled();
+ expect(evalSpy).not.toHaveBeenCalled();
$browser.defer.flush();
- expect(eval).toHaveBeenCalled();
+ expect(evalSpy).toHaveBeenCalled();
});
it('should allow you to specify the delay time', function(){
diff --git a/test/service/xhr.cacheSpec.js b/test/service/xhr.cacheSpec.js
index ecaebc3f..4d3e3e08 100644
--- a/test/service/xhr.cacheSpec.js
+++ b/test/service/xhr.cacheSpec.js
@@ -124,21 +124,21 @@ describe('$xhr.cache', function() {
it('should call eval after callbacks for both cache hit and cache miss execute', function() {
- var eval = this.spyOn(scope, '$eval').andCallThrough();
+ var evalSpy = this.spyOn(scope, '$eval').andCallThrough();
$browserXhr.expectGET('/url').respond('+');
cache('GET', '/url', null, callback);
- expect(eval).not.toHaveBeenCalled();
+ expect(evalSpy).not.toHaveBeenCalled();
$browserXhr.flush();
- expect(eval).toHaveBeenCalled();
+ expect(evalSpy).toHaveBeenCalled();
- eval.reset(); //reset the spy
+ evalSpy.reset(); //reset the spy
cache('GET', '/url', null, callback);
- expect(eval).not.toHaveBeenCalled();
+ expect(evalSpy).not.toHaveBeenCalled();
$browser.defer.flush();
- expect(eval).toHaveBeenCalled();
+ expect(evalSpy).toHaveBeenCalled();
});
});