diff --git a/ghost/core/test/e2e-api/content/authors.test.js b/ghost/core/test/e2e-api/content/authors.test.js index 306697704e..9829f59d58 100644 --- a/ghost/core/test/e2e-api/content/authors.test.js +++ b/ghost/core/test/e2e-api/content/authors.test.js @@ -14,7 +14,7 @@ describe('Authors Content API', function () { before(async function () { await localUtils.startGhost(); request = supertest.agent(config.get('url')); - await testUtils.initFixtures('owner:post', 'users:no-owner', 'user:inactive', 'posts', 'api_keys'); + await testUtils.initFixtures('owner:post', 'users', 'user:inactive', 'posts', 'api_keys'); }); afterEach(function () { diff --git a/ghost/core/test/e2e-api/content/pages.test.js b/ghost/core/test/e2e-api/content/pages.test.js index 41ca8b2e12..4b7aca030e 100644 --- a/ghost/core/test/e2e-api/content/pages.test.js +++ b/ghost/core/test/e2e-api/content/pages.test.js @@ -18,7 +18,7 @@ describe('Pages Content API', function () { before(async function () { agent = await agentProvider.getContentAPIAgent(); - await fixtureManager.init('users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'api_keys'); + await fixtureManager.init('users', 'user:inactive', 'posts', 'tags:extra', 'api_keys'); await agent.authenticate(); }); diff --git a/ghost/core/test/e2e-api/content/posts.test.js b/ghost/core/test/e2e-api/content/posts.test.js index 75f6ef043c..88e404372e 100644 --- a/ghost/core/test/e2e-api/content/posts.test.js +++ b/ghost/core/test/e2e-api/content/posts.test.js @@ -27,7 +27,7 @@ describe('Posts Content API', function () { before(async function () { agent = await agentProvider.getContentAPIAgent(); - await fixtureManager.init('owner:post', 'users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'api_keys', 'newsletters', 'members:newsletters'); + await fixtureManager.init('owner:post', 'users', 'user:inactive', 'posts', 'tags:extra', 'api_keys', 'newsletters', 'members:newsletters'); await agent.authenticate(); // Assign a newsletter to one of the posts diff --git a/ghost/core/test/e2e-api/content/tags.test.js b/ghost/core/test/e2e-api/content/tags.test.js index 42d5dbb09b..c0324395d5 100644 --- a/ghost/core/test/e2e-api/content/tags.test.js +++ b/ghost/core/test/e2e-api/content/tags.test.js @@ -15,7 +15,7 @@ describe('Tags Content API', function () { before(async function () { await localUtils.startGhost(); request = supertest.agent(config.get('url')); - await testUtils.initFixtures('users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'api_keys'); + await testUtils.initFixtures('users', 'user:inactive', 'posts', 'tags:extra', 'api_keys'); }); afterEach(function () { diff --git a/ghost/core/test/regression/api/admin/update-user-last-seen.test.js b/ghost/core/test/regression/api/admin/update-user-last-seen.test.js index 7a3ef600f0..deb493fe3f 100644 --- a/ghost/core/test/regression/api/admin/update-user-last-seen.test.js +++ b/ghost/core/test/regression/api/admin/update-user-last-seen.test.js @@ -25,7 +25,7 @@ describe('Update User Last Seen', function () { await agent.loginAsOwner(); // Fixtures aren't working for roles. So need to use the owner for now. - /*await fixtureManager.init('roles', 'users:no-owner'); + /*await fixtureManager.init('roles', 'users'); await agent.loginAs( DataGenerator.Content.users[1].email, DataGenerator.Content.users[1].password diff --git a/ghost/core/test/regression/api/content/authors.test.js b/ghost/core/test/regression/api/content/authors.test.js index 4ff742a592..a65753b139 100644 --- a/ghost/core/test/regression/api/content/authors.test.js +++ b/ghost/core/test/regression/api/content/authors.test.js @@ -12,7 +12,7 @@ describe('Authors Content API', function () { before(async function () { await localUtils.startGhost(); request = supertest.agent(config.get('url')); - await testUtils.initFixtures('owner:post', 'users:no-owner', 'user:inactive', 'posts', 'api_keys'); + await testUtils.initFixtures('owner:post', 'users', 'user:inactive', 'posts', 'api_keys'); }); afterEach(function () { diff --git a/ghost/core/test/regression/api/content/pages.test.js b/ghost/core/test/regression/api/content/pages.test.js index 5d6491a911..7bbd4865c4 100644 --- a/ghost/core/test/regression/api/content/pages.test.js +++ b/ghost/core/test/regression/api/content/pages.test.js @@ -13,7 +13,7 @@ describe('api/endpoints/content/pages', function () { before(async function () { await localUtils.startGhost(); request = supertest.agent(config.get('url')); - await testUtils.initFixtures('users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'api_keys'); + await testUtils.initFixtures('users', 'user:inactive', 'posts', 'tags:extra', 'api_keys'); }); afterEach(function () { diff --git a/ghost/core/test/regression/api/content/posts.test.js b/ghost/core/test/regression/api/content/posts.test.js index 98f1d413ed..1bb4a3f4fc 100644 --- a/ghost/core/test/regression/api/content/posts.test.js +++ b/ghost/core/test/regression/api/content/posts.test.js @@ -13,7 +13,7 @@ describe('api/endpoints/content/posts', function () { before(async function () { await localUtils.startGhost(); request = supertest.agent(config.get('url')); - await testUtils.initFixtures('users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'api_keys'); + await testUtils.initFixtures('users', 'user:inactive', 'posts', 'tags:extra', 'api_keys'); }); afterEach(function () { diff --git a/ghost/core/test/regression/api/content/tags.test.js b/ghost/core/test/regression/api/content/tags.test.js index fee7e5d6bc..043a5be4be 100644 --- a/ghost/core/test/regression/api/content/tags.test.js +++ b/ghost/core/test/regression/api/content/tags.test.js @@ -14,7 +14,7 @@ describe('api/endpoints/content/tags', function () { before(async function () { await localUtils.startGhost(); request = supertest.agent(config.get('url')); - await testUtils.initFixtures('users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'api_keys'); + await testUtils.initFixtures('users', 'user:inactive', 'posts', 'tags:extra', 'api_keys'); }); afterEach(function () { diff --git a/ghost/core/test/utils/fixture-utils.js b/ghost/core/test/utils/fixture-utils.js index 49cc03a39e..1ef39824c1 100644 --- a/ghost/core/test/utils/fixture-utils.js +++ b/ghost/core/test/utils/fixture-utils.js @@ -277,7 +277,7 @@ const fixtures = { }); }, - createUsersWithoutOwner: async function createUsersWithoutOwner() { + ensureUserForEachRole: async function ensureUserForEachRole() { const usersWithoutOwner = _.cloneDeep(DataGenerator.forKnex.users.slice(1)); let roles = await models.Role.fetchAll(); @@ -739,8 +739,8 @@ const toDoList = { 'users:roles': function createUsersWithRoles() { return fixtures.createUsersWithRoles(); }, - 'users:no-owner': function createUsersWithoutOwner() { - return fixtures.createUsersWithoutOwner(); + users: function ensureUserForEachRole() { + return fixtures.ensureUserForEachRole(); }, 'user:inactive': function createInactiveUser() { return fixtures.createInactiveUser();