test(ngRepeat): fix IE8 test compatibility issue

This commit is contained in:
Igor Minar 2013-07-01 14:29:37 -07:00
parent 807394095b
commit 0c6fb665a4

View file

@ -527,13 +527,13 @@ describe('ngRepeat', function() {
inject(function($templateCache, $compile, $rootScope) {
$compileProvider.directive('replaceMeWithRepeater', function() {
return {
restrict: 'E',
restrict: 'A',
replace: true,
templateUrl: 'replace-me-with-repeater.html'
};
});
$templateCache.put('replace-me-with-repeater.html', '<div ng-repeat="i in [1,2,3]">{{i}}</div>');
element = $compile('<div><replace-me-with-repeater></replace-me-with-repeater></div>')($rootScope);
element = $compile('<div><div replace-me-with-repeater></div></div>')($rootScope);
expect(element.text()).toBe('');
$rootScope.$apply();
expect(element.text()).toBe('123');