Skip to content

Instantly share code, notes, and snippets.

@dgtlmonk
Created May 27, 2019 05:07
Show Gist options
  • Save dgtlmonk/2fca1963790ae668e45cf02f1a847edd to your computer and use it in GitHub Desktop.
Save dgtlmonk/2fca1963790ae668e45cf02f1a847edd to your computer and use it in GitHub Desktop.
ember-qunit - Testing that actions don't fire
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