diff options
Diffstat (limited to 'test/AngularSpec.js')
| -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(); +    }); +       +  }); +  });  | 
