Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tests/integration/helpers/id-for-deprecation-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ module('Integration | Helper | id-for-deprecation', function (hooks) {
test('anchor id is prefixed with toc_', async function (assert) {
this.set('inputValue', 'toJSON');

await render(hbs`{{id-for-deprecation inputValue}}`);
await render(hbs`{{id-for-deprecation this.inputValue}}`);

assert.equal(this.element.textContent.trim(), 'toc_toJSON');
});
test('anchor id has periods, commas, and colons replaced with dashes', async function (assert) {
this.set('inputValue', 'ember-data:object.init,constructor');

await render(hbs`{{id-for-deprecation inputValue}}`);
await render(hbs`{{id-for-deprecation this.inputValue}}`);

assert.equal(
this.element.textContent.trim(),
Expand All @@ -27,7 +27,7 @@ module('Integration | Helper | id-for-deprecation', function (hooks) {
test('anchor id has whitespace stripped out', async function (assert) {
this.set('inputValue', 'ember_object.some property');

await render(hbs`{{id-for-deprecation inputValue}}`);
await render(hbs`{{id-for-deprecation this.inputValue}}`);

assert.equal(
this.element.textContent.trim(),
Expand All @@ -41,7 +41,9 @@ module('Integration | Helper | id-for-deprecation', function (hooks) {
this.set('deprecationId', 'my-deprecation');
this.set('optionalAnchorId', anchor);

await render(hbs`{{id-for-deprecation deprecationId optionalAnchorId}}`);
await render(
hbs`{{id-for-deprecation this.deprecationId this.optionalAnchorId}}`
);

assert.equal(this.element.textContent.trim(), anchor);
});
Expand Down