diff --git a/tests/integration/components/headers/ember-thead-test.js b/tests/integration/components/headers/ember-thead-test.js index 29bb79c84..6a885e044 100644 --- a/tests/integration/components/headers/ember-thead-test.js +++ b/tests/integration/components/headers/ember-thead-test.js @@ -129,17 +129,6 @@ async function testColumnAddition(assert, table) { assert.equal(table.containerWidth, originalContainerWidth, 'table container width is unchanged'); } -// In Ember-1.12, the `this` context has a `context` property itself that is used to `get` or `set`. -// This function provides Ember-1.12 compatibility for `this.get` -function compatGet(context, propName) { - return context.get ? context.get(propName) : context.context.get(propName); -} - -// This function provides Ember-1.12 compatibility for `this.set` -function compatSet(context, propName, value) { - return context.set ? context.set(propName, value) : context.context.set(propName, value); -} - moduleForComponent('ember-thead', '[Unit] ember-thead', { integration: true }); test('table resizes when columns are removed', async function(assert) { @@ -147,7 +136,7 @@ test('table resizes when columns are removed', async function(assert) { this.set('rows', data.rows); this.set('columns', data.columns); this.on('removeColumn', function() { - compatSet(this, 'columns', compatGet(this, 'columns').slice(0, -1)); + this.set('columns', this.get('columns').slice(0, -1)); }); await renderTable(this); @@ -159,7 +148,7 @@ test('table resizes when columns are removed via mutation', async function(asser this.set('rows', data.rows); this.set('columns', A(data.columns)); this.on('removeColumn', function() { - compatGet(this, 'columns').popObject(); + this.get('columns').popObject(); }); await renderTable(this); @@ -171,7 +160,7 @@ test('table resizes when columns are added', async function(assert) { this.set('rows', data.rows); this.set('columns', data.columns); this.on('addColumn', function() { - compatSet(this, 'columns', [...data.columns, data.newColumn]); + this.set('columns', [...data.columns, data.newColumn]); }); await renderTable(this); @@ -183,7 +172,7 @@ test('table resizes when columns are added via mutation', async function(assert) this.set('rows', data.rows); this.set('columns', A(data.columns)); this.on('addColumn', function() { - compatGet(this, 'columns').pushObject(data.newColumn); + this.get('columns').pushObject(data.newColumn); }); await renderTable(this);