diff --git a/packages/ember-views/lib/system/build-component-template.js b/packages/ember-views/lib/system/build-component-template.js index c66dc0bfcdf..fe8cff9a2a2 100644 --- a/packages/ember-views/lib/system/build-component-template.js +++ b/packages/ember-views/lib/system/build-component-template.js @@ -238,7 +238,7 @@ function normalizeClasses(classes, output) { // Legacy :class microsyntax for static class names if (propName === '') { output.push(activeClass); - return; + continue; } // 2.0TODO: Remove deprecated global path diff --git a/packages/ember-views/tests/views/view/class_name_bindings_test.js b/packages/ember-views/tests/views/view/class_name_bindings_test.js index 2c6e845a54a..c8d27685c83 100644 --- a/packages/ember-views/tests/views/view/class_name_bindings_test.js +++ b/packages/ember-views/tests/views/view/class_name_bindings_test.js @@ -113,6 +113,16 @@ QUnit.test(":: class name syntax works with an empty true class", function() { equal(view.$().attr('class'), 'ember-view', "no class is added when property is true and the class is empty"); }); +QUnit.test("uses all provided static class names (issue #11193)", function() { + view = EmberView.create({ + classNameBindings: [':class-one', ':class-two'] + }); + + run(function() { view.createElement(); }); + + equal(view.$().attr('class'), 'ember-view class-one class-two', "both classes are added"); +}); + QUnit.test("classNames should not be duplicated on rerender", function() { run(function() { view = EmberView.create({