Created
May 27, 2019 05:07
-
-
Save dgtlmonk/2fca1963790ae668e45cf02f1a847edd to your computer and use it in GitHub Desktop.
ember-qunit - Testing that actions don't fire
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test('a button does not fire when disabled', async function(assert) { | |
let myAction = function() { | |
assert.step('button clicked'); | |
}; | |
this.set('myAction', myAction); | |
await render(hbs`{{#ui-button onClick=(action myAction) disabled=true}}my button{{/ui-button}}`); | |
await click('button'); | |
assert.verifySteps([]); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment