From 4ce3d58e34b712a45949c9efd31573db228f67ca Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 7 Sep 2022 17:57:15 +0100 Subject: [PATCH] Fixed linting refs https://github.com/TryGhost/Ghost/commit/aa53a1c71f630798610dbd274006b90be22d3998 - missed some cleanup when replacing tests --- .../tests/acceptance/settings/tags-test.js | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/ghost/admin/tests/acceptance/settings/tags-test.js b/ghost/admin/tests/acceptance/settings/tags-test.js index 6c1a86cc1e..e58375ea5e 100644 --- a/ghost/admin/tests/acceptance/settings/tags-test.js +++ b/ghost/admin/tests/acceptance/settings/tags-test.js @@ -1,13 +1,10 @@ -import windowProxy from 'ghost-admin/utils/window-proxy'; import {Response} from 'miragejs'; -import {afterEach, beforeEach, describe, it} from 'mocha'; import {authenticateSession, invalidateSession} from 'ember-simple-auth/test-support'; -import {blur, click, currentRouteName, currentURL, fillIn, find, findAll, settled} from '@ember/test-helpers'; +import {beforeEach, describe, it} from 'mocha'; +import {click, currentRouteName, currentURL, fillIn, find, findAll} from '@ember/test-helpers'; import {expect} from 'chai'; -import {run} from '@ember/runloop'; import {setupApplicationTest} from 'ember-mocha'; import {setupMirage} from 'ember-cli-mirage/test-support'; -import {timeout} from 'ember-concurrency'; import {visit} from '../../helpers/visit'; describe('Acceptance: Tags', function () { @@ -42,25 +39,13 @@ describe('Acceptance: Tags', function () { }); describe('when logged in', function () { - let newLocation, originalReplaceState; - beforeEach(async function () { let role = this.server.create('role', {name: 'Administrator'}); this.server.create('user', {roles: [role]}); - originalReplaceState = windowProxy.replaceState; - windowProxy.replaceState = function (params, title, url) { - newLocation = url; - }; - newLocation = undefined; - return await authenticateSession(); }); - afterEach(function () { - windowProxy.replaceState = originalReplaceState; - }); - it('lists public and internal tags separately', async function () { this.server.create('tag', {name: 'B - Third', slug: 'third'}); this.server.create('tag', {name: 'Z - Last', slug: 'last'}); @@ -152,7 +137,7 @@ describe('Acceptance: Tags', function () { }); it('can load tag via slug in url', async function () { - const tag = this.server.create('tag', {name: 'To be edited', slug: 'to-be-edited'}); + this.server.create('tag', {name: 'To be edited', slug: 'to-be-edited'}); await visit('tags/to-be-edited'); expect(currentURL()).to.equal('tags/to-be-edited');