diff options
Diffstat (limited to 'test/AngularSpec.js')
| -rw-r--r-- | test/AngularSpec.js | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 50b296bd..62298465 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -284,25 +284,6 @@ describe('angularJsConfig', function() { }); }); -describe('extensionMap', function() { - it('should preserve $ properties on override', function() { - var extension = extensionMap({}, 'fake'); - extension('first', {$one: true, $two: true}); - var result = extension('first', {$one: false, $three: true}); - - expect(result.$one).toBeFalsy(); - expect(result.$two).toBeTruthy(); - expect(result.$three).toBeTruthy(); - }); - - it('should not preserve non-angular properties', function() { - var extension = extensionMap({}, 'fake'); - extension('first', {two: true}); - var result = extension('first', {$one: false, $three: true}); - - expect(result.two).not.toBeDefined(); - }); -}); describe('angular service', function() { it('should override services', function() { @@ -313,13 +294,14 @@ describe('angular service', function() { expect(scope.$service('fake')).toEqual('new'); }); - it('should preserve $ properties on override', function() { - angular.service('fake', {$one: true}, {$two: true}); - var result = angular.service('fake', {$third: true}); + 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).toBeTruthy(); - expect(result.$two).toBeTruthy(); - expect(result.$third).toBeTruthy(); + 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() { |
