Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
Fix unit test in IE7
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina authored and IgorMinar committed Jun 2, 2011
1 parent 2e51999 commit aa64d37
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/angular-mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ MockBrowser.prototype = {
}
return this.cookieHash;
}
}
},

addJs: function(){}
};

angular.service('$browser', function(){
Expand Down
3 changes: 1 addition & 2 deletions test/AngularSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,8 @@ describe('angular', function(){
return this.childNodes[1];
};

angularInit({autobind: 'child'}, dom);

delete dom.getElementById; //make IE and sortedHtml happy
angularInit({autobind: 'child'}, dom);

expect(sortedHtml(dom)).toEqual('<div foo="{{1+2}}">{{2+3}}' +
'<div bar="7" id="child" ng:bind-attr="{"bar":"{{3+4}}"}">'+
Expand Down
2 changes: 1 addition & 1 deletion test/testabilityPatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function sortedHtml(element, showNgClass) {
attr.name !='style' &&
attr.name.substr(0, 6) != 'jQuery') {
// in IE we need to check for all of these.
if (!/ng-\d+/.exec(attr.name))
if (!/ng-\d+/.exec(attr.name) && attr.name != 'getElementById')
attrs.push(' ' + attr.name + '="' + attr.value + '"');
}
}
Expand Down

0 comments on commit aa64d37

Please sign in to comment.