From a1320315f979c34b3fb64054106fc8aaba10d656 Mon Sep 17 00:00:00 2001 From: Ilya Radchenko Date: Tue, 31 Mar 2015 18:12:48 -0400 Subject: [PATCH] Fix toggled test --- tests/unit/components/x-toggle-test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/components/x-toggle-test.js b/tests/unit/components/x-toggle-test.js index cadde30..9bb7b00 100644 --- a/tests/unit/components/x-toggle-test.js +++ b/tests/unit/components/x-toggle-test.js @@ -21,22 +21,22 @@ test('it renders', function(assert) { assert.equal(component._state, 'inDOM'); }); -test('changing value changes state', function (assert) { +test('changing toggled changes state', function (assert) { assert.expect(3); var component = this.subject(); - assert.equal(this.$('input.x-toggle').attr('checked'), false, 'unchecked by default'); + assert.equal(this.$('input.x-toggle').prop('checked'), false, 'unchecked by default'); Ember.run(function () { - component.set('value', true); + component.set('toggled', true); }); - assert.equal(this.$('input.x-toggle').attr('checked'), true, 'checked when value: true'); + assert.equal(this.$('input.x-toggle').prop('checked'), true, 'checked when toggled: true'); Ember.run(function () { - component.set('value', false); + component.set('toggled', false); }); - assert.equal(this.$('input.x-toggle').attr('checked'), false, 'unchecked when value: false'); + assert.equal(this.$('input.x-toggle').prop('checked'), false, 'unchecked when toggled: false'); });