Skip to content

Commit

Permalink
Reproduction for frozen params, hash bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mixonic committed Nov 29, 2016
1 parent 6b20767 commit a733552
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,30 @@ moduleFor('Helpers test: custom helpers', class extends RenderingTest {
assert.strictEqual(destroyCount, 0, 'destroy is not called on recomputation');
}

['@test helper params can be returned']() {
this.registerHelper('hello-world', values => {
return values;
});

this.render('{{#each (hello-world model) as |item|}}({{item}}){{/each}}', {
model: ['bob']
});

this.assertText('(bob)');
}

['@test helper hash can be returned']() {
this.registerHelper('hello-world', (_, hash) => {
return hash;
});

this.render(`{{get (hello-world model) 'name'}}`, {
model: { name: 'bob' }
});

this.assertText('bob');
}

['@test simple helper is called for param changes']() {
let computeCount = 0;

Expand Down

0 comments on commit a733552

Please sign in to comment.