test(ionList): makes ure it works with variable interpolation

This commit is contained in:
Andy Joslin
2014-04-23 10:50:25 -06:00
parent a7eb521c90
commit c84406c6dc
2 changed files with 5 additions and 3 deletions

View File

@@ -235,11 +235,13 @@ describe('ionItem directive', function() {
});
['href', 'ng-href'].forEach(function(attr) {
it('should be complex anchor if '+attr+' is defined', function() {
var el = setup(attr+'="something"');
var el = setup(attr+'="something/{{foo}}"');
expect(el.hasClass('item item-complex')).toBe(true);
expect(el.children()[0].tagName).toBe('A');
expect(el.children().hasClass('item-content')).toBe(true);
expect(el.children().attr('ng-href')).toBe('something');
expect(el.children().attr('href')).toBe('something/');
el.scope().$apply('foo = 44');
expect(el.children().attr('href')).toBe('something/44');
});
});
['ion-option-button','ion-reorder-button','ion-delete-button'].forEach(function(tag) {