aboutsummaryrefslogtreecommitdiffstats
path: root/test/AngularSpec.js
diff options
context:
space:
mode:
authorJames Morrin2012-11-06 17:35:47 -0500
committerMisko Hevery2013-02-14 14:43:55 -0800
commit12ba6cec4fb79521101744e02a7e09f9fbb591c4 (patch)
tree618987b1edd5ec5a871a000e45b6b69d35e889f6 /test/AngularSpec.js
parentb7e1fb0515798e1b4f3f2426f6b050951bee2617 (diff)
downloadangular.js-12ba6cec4fb79521101744e02a7e09f9fbb591c4.tar.bz2
feat(noConflict): restore previous angular namespace reference
Diffstat (limited to 'test/AngularSpec.js')
-rw-r--r--test/AngularSpec.js23
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();
+ });
+
+ });
+
});