diff --git a/test/select.spec.js b/test/select.spec.js index 7c4018638..c265abae3 100644 --- a/test/select.spec.js +++ b/test/select.spec.js @@ -128,6 +128,7 @@ describe('ui-select tests', function() { if (attrs.appendToBody !== undefined) { attrsHtml += ' append-to-body="' + attrs.appendToBody + '"'; } if (attrs.allowClear !== undefined) { matchAttrsHtml += ' allow-clear="' + attrs.allowClear + '"';} if (attrs.inputId !== undefined) { attrsHtml += ' input-id="' + attrs.inputId + '"'; } + if (attrs.ngClass !== undefined) { attrsHtml += ' ng-class="' + attrs.ngClass + '"'; } } return compileTemplate( @@ -349,6 +350,14 @@ describe('ui-select tests', function() { expect(getMatchLabel(el)).toEqual('Adam'); }); + it('should merge both ng-class attributes defined on ui-select and its templates', function() { + var el = createUiSelect({ + ngClass: "{class: expression}" + }); + + expect($(el).attr('ng-class')).toEqual("{class: expression, open: $select.open}"); + }); + it('should correctly render initial state with track by feature', function() { var el = compileTemplate( ' \