Skip to content

Commit 48b6aae

Browse files
ci(tests/integration/components/paper-radio-test): adds test for setting @checked directly.
1 parent f4de6ce commit 48b6aae

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/integration/components/paper-radio-test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,22 @@ module('Integration | Component | paper radio', function(hooks) {
2525
assert.dom('md-radio-button').doesNotHaveClass('md-checked');
2626
});
2727

28+
test('should set and remove checked css class if checked is passed in', async function(assert) {
29+
assert.expect(2);
30+
31+
this.set('checked', true);
32+
await render(hbs`
33+
{{#paper-radio value="1" checked=checked onChange=(action (mut checked))}}
34+
Radio button 1
35+
{{/paper-radio}}
36+
`);
37+
assert.dom('md-radio-button').hasClass('md-checked');
38+
39+
this.set('checked', false);
40+
assert.dom('md-radio-button').doesNotHaveClass('md-checked');
41+
});
42+
43+
2844
test('should trigger an action when checking', async function(assert) {
2945
assert.expect(1);
3046

0 commit comments

Comments
 (0)