aboutsummaryrefslogtreecommitdiffstats
path: root/test/AngularSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2011-01-19 15:42:11 -0800
committerMisko Hevery2011-01-24 14:23:51 -0800
commitc2f2587a79aeb77aad66f081cf924a79348a698e (patch)
tree8f5aa4cc6e7189befb834388b2102d1eda88a975 /test/AngularSpec.js
parent5d0d34ae72a9ca47f1b2dabda60711ad16ee9313 (diff)
downloadangular.js-c2f2587a79aeb77aad66f081cf924a79348a698e.tar.bz2
fixed example rendering, add tests for it.
Diffstat (limited to 'test/AngularSpec.js')
-rw-r--r--test/AngularSpec.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/AngularSpec.js b/test/AngularSpec.js
index 0e6b2bfa..010dce7c 100644
--- a/test/AngularSpec.js
+++ b/test/AngularSpec.js
@@ -312,24 +312,24 @@ describe('angular service', function() {
var scope = createScope();
angular.service('fake', function() { return 'old'; });
angular.service('fake', function() { return 'new'; });
-
+
expect(scope.$service('fake')).toEqual('new');
});
-
+
it('should not preserve properties on override', function() {
angular.service('fake', {$one: true}, {$two: true}, {three: true});
var result = angular.service('fake', {$four: true});
-
+
expect(result.$one).toBeUndefined();
expect(result.$two).toBeUndefined();
expect(result.three).toBeUndefined();
expect(result.$four).toBe(true);
});
-
+
it('should not preserve non-angular properties on override', function() {
angular.service('fake', {one: true}, {two: true});
var result = angular.service('fake', {third: true});
-
+
expect(result.one).not.toBeDefined();
expect(result.two).not.toBeDefined();
expect(result.third).toBeTruthy();