diff options
| author | James Morrin | 2012-11-06 17:35:47 -0500 |
|---|---|---|
| committer | Misko Hevery | 2013-02-14 14:43:55 -0800 |
| commit | 12ba6cec4fb79521101744e02a7e09f9fbb591c4 (patch) | |
| tree | 618987b1edd5ec5a871a000e45b6b69d35e889f6 /test | |
| parent | b7e1fb0515798e1b4f3f2426f6b050951bee2617 (diff) | |
| download | angular.js-12ba6cec4fb79521101744e02a7e09f9fbb591c4.tar.bz2 | |
feat(noConflict): restore previous angular namespace reference
Diffstat (limited to 'test')
| -rw-r--r-- | test/AngularSpec.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/AngularSpec.js b/test/AngularSpec.js index e734decf..aed191e7 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -737,4 +737,27 @@ describe('angular', function() { expect(toJson({key: $rootScope})).toEqual('{"key":"$SCOPE"}'); })); }); + + describe('noConflict', function() { + var globalAngular; + beforeEach(function() { + globalAngular = angular; + }); + + afterEach(function() { + angular = globalAngular; + }); + + it('should return angular', function() { + var a = angular.noConflict(); + expect(a).toBe(globalAngular); + }); + + it('should restore original angular', function() { + var a = angular.noConflict(); + expect(angular).toBeUndefined(); + }); + + }); + }); |
