Renamed users:no-owner to users as main user fixture
- This fixture is the main user fixture you'd want to use when testing staff roles - At the moment it has a weird name that makes it less likely people will use it - A tiny step in trying to make our fixture system make a tiny bit more sense
This commit is contained in:
parent
def4b8ba18
commit
588c9d04e8
@ -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 () {
|
||||
|
@ -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();
|
||||
});
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 () {
|
||||
|
@ -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
|
||||
|
@ -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 () {
|
||||
|
@ -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 () {
|
||||
|
@ -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 () {
|
||||
|
@ -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 () {
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user