test(ngRepeat): move an existing test into the right describe block

This commit is contained in:
Igor Minar
2014-09-09 02:16:45 +02:00
parent 9ce4029430
commit 624bb8a8b9

View File

@@ -1332,6 +1332,27 @@ describe('ngRepeat and transcludes', function() {
dealoc(element);
});
});
it('should work with svg elements when the svg container is transcluded', function() {
module(function($compileProvider) {
$compileProvider.directive('svgContainer', function() {
return {
template: '<svg ng-transclude></svg>',
replace: true,
transclude: true
};
});
});
inject(function($compile, $rootScope) {
element = $compile('<svg-container><circle ng-repeat="r in rows"></circle></svg-container>')($rootScope);
$rootScope.rows = [1];
$rootScope.$apply();
var circle = element.find('circle');
expect(circle[0].toString()).toMatch(/SVG/);
});
});
});
describe('ngRepeat animations', function() {
@@ -1464,25 +1485,4 @@ describe('ngRepeat animations', function() {
expect(item.element.text()).toBe('3');
})
);
it('should work with svg elements when the svg container is transcluded', function() {
module(function($compileProvider) {
$compileProvider.directive('svgContainer', function() {
return {
template: '<svg ng-transclude></svg>',
replace: true,
transclude: true
};
});
});
inject(function($compile, $rootScope) {
element = $compile('<svg-container><circle ng-repeat="r in rows"></circle></svg-container>')($rootScope);
$rootScope.rows = [1];
$rootScope.$apply();
var circle = element.find('circle');
expect(circle[0].toString()).toMatch(/SVG/);
});
});
});