aboutsummaryrefslogtreecommitdiffstats
path: root/test/ngMock/angular-mocksSpec.js
diff options
context:
space:
mode:
authorTobias Bosch2013-11-21 14:30:50 -0800
committerTobias Bosch2013-11-21 21:53:09 -0800
commit579242346c4202ea58fc2cae6df232289cbea0bb (patch)
treec2ef1ed6020f93994a080d13871c636e5618fbb5 /test/ngMock/angular-mocksSpec.js
parentc42d0a041890b39fc98afd357ec1307a3a36208d (diff)
downloadangular.js-579242346c4202ea58fc2cae6df232289cbea0bb.tar.bz2
fix(tests): Correct tests for IE11
Some tests were wrong. However, src/* did not contain problems. Fixes #5046
Diffstat (limited to 'test/ngMock/angular-mocksSpec.js')
-rw-r--r--test/ngMock/angular-mocksSpec.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/ngMock/angular-mocksSpec.js b/test/ngMock/angular-mocksSpec.js
index 80580fb1..15ebc758 100644
--- a/test/ngMock/angular-mocksSpec.js
+++ b/test/ngMock/angular-mocksSpec.js
@@ -1,11 +1,8 @@
'use strict';
-var msie = +((/msie (\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1]);
-
describe('ngMock', function() {
var noop = angular.noop;
-
describe('TzDate', function() {
function minutes(min) {
@@ -686,10 +683,10 @@ describe('ngMock', function() {
expect(d($rootScope)).toMatch(/{"abc":"123"}/);
}));
- it('should serialize scope that has overridden "hasOwnProperty"', inject(function($rootScope){
+ it('should serialize scope that has overridden "hasOwnProperty"', inject(function($rootScope, $sniffer){
// MS IE8 just doesn't work for this kind of thing, since "for ... in" doesn't return
// things like hasOwnProperty even if it is explicitly defined on the actual object!
- if (msie<=8) return;
+ if ($sniffer.msie<=8) return;
$rootScope.hasOwnProperty = 'X';
expect(d($rootScope)).toMatch(/Scope\(.*\): \{/);
expect(d($rootScope)).toMatch(/hasOwnProperty: "X"/);