diff --git a/test-app/tests/integration/helpers/queue-test.js b/test-app/tests/integration/helpers/queue-test.js index 1bd95a5..2bc73d0 100644 --- a/test-app/tests/integration/helpers/queue-test.js +++ b/test-app/tests/integration/helpers/queue-test.js @@ -29,6 +29,23 @@ module('Integration | Helper | {{queue}}', function(hooks) { assert.dom('p').hasText('4', 'should render 4'); }); + test('it can curry a function with the fn helper', async function(assert) { + this.doAThing = () => null; + this.process = (x) => this.set('value', x * x); + this.undoAThing = () => null; + this.set('value', 0); + await render(hbs` +
{{this.value}}
+ + `); + + assert.dom('p').hasText('0', 'precond - should render 0'); + await click('button'); + assert.dom('p').hasText('9', 'should render 9'); + }); + test('it handles promises', async function(assert) { this.set('value', 3); this.actions.doAThingThatTakesTime = resolve;