diff options
Diffstat (limited to 'test/ng/directive/ngSrcSpec.js')
| -rw-r--r-- | test/ng/directive/ngSrcSpec.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ng/directive/ngSrcSpec.js b/test/ng/directive/ngSrcSpec.js index 2fb99eab..3dc00257 100644 --- a/test/ng/directive/ngSrcSpec.js +++ b/test/ng/directive/ngSrcSpec.js @@ -26,8 +26,8 @@ describe('ngSrc', function() { it('should error on src attributes for a different domain', inject(function($compile, $rootScope) { element = $compile('<iframe ng-src="{{testUrl}}"></iframe>')($rootScope); $rootScope.testUrl = "http://a.different.domain.example.com"; - expect(function() { $rootScope.$apply() }).toThrow( - "[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:insecurl] Blocked " + + expect(function() { $rootScope.$apply() }).toThrowMinErr( + "$interpolate", "interr", "Can't interpolate: {{testUrl}}\nError: [$sce:insecurl] Blocked " + "loading resource from url not allowed by $sceDelegate policy. URL: " + "http://a.different.domain.example.com"); })); @@ -35,8 +35,8 @@ describe('ngSrc', function() { it('should error on JS src attributes', inject(function($compile, $rootScope) { element = $compile('<iframe ng-src="{{testUrl}}"></iframe>')($rootScope); $rootScope.testUrl = "javascript:alert(1);"; - expect(function() { $rootScope.$apply() }).toThrow( - "[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:insecurl] Blocked " + + expect(function() { $rootScope.$apply() }).toThrowMinErr( + "$interpolate", "interr", "Can't interpolate: {{testUrl}}\nError: [$sce:insecurl] Blocked " + "loading resource from url not allowed by $sceDelegate policy. URL: " + "javascript:alert(1);"); })); @@ -44,8 +44,8 @@ describe('ngSrc', function() { it('should error on non-resource_url src attributes', inject(function($compile, $rootScope, $sce) { element = $compile('<iframe ng-src="{{testUrl}}"></iframe>')($rootScope); $rootScope.testUrl = $sce.trustAsUrl("javascript:doTrustedStuff()"); - expect($rootScope.$apply).toThrow( - "[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:insecurl] Blocked " + + expect($rootScope.$apply).toThrowMinErr( + "$interpolate", "interr", "Can't interpolate: {{testUrl}}\nError: [$sce:insecurl] Blocked " + "loading resource from url not allowed by $sceDelegate policy. URL: " + "javascript:doTrustedStuff()"); })); |
