mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 13:27:31 -08:00
🎨 Formatting fixes
This commit is contained in:
parent
f8eb5aa52a
commit
70a1aa53f7
|
@ -23,11 +23,8 @@ beforeAll(async () => {
|
||||||
const initResult = await testDb.init();
|
const initResult = await testDb.init();
|
||||||
testDbName = initResult.testDbName;
|
testDbName = initResult.testDbName;
|
||||||
|
|
||||||
const [
|
const [fetchedGlobalOwnerRole, fetchedGlobalMemberRole, fetchedWorkflowOwnerRole] =
|
||||||
fetchedGlobalOwnerRole,
|
await testDb.getAllRoles();
|
||||||
fetchedGlobalMemberRole,
|
|
||||||
fetchedWorkflowOwnerRole,
|
|
||||||
] = await testDb.getAllRoles();
|
|
||||||
|
|
||||||
globalOwnerRole = fetchedGlobalOwnerRole;
|
globalOwnerRole = fetchedGlobalOwnerRole;
|
||||||
globalMemberRole = fetchedGlobalMemberRole;
|
globalMemberRole = fetchedGlobalMemberRole;
|
||||||
|
@ -41,10 +38,7 @@ beforeAll(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await testDb.truncate(
|
await testDb.truncate(['SharedWorkflow', 'User', 'Workflow'], testDbName);
|
||||||
['SharedCredentials', 'SharedWorkflow', 'User', 'Workflow', 'Credentials', 'Tag'],
|
|
||||||
testDbName,
|
|
||||||
);
|
|
||||||
|
|
||||||
config.set('userManagement.disabled', false);
|
config.set('userManagement.disabled', false);
|
||||||
config.set('userManagement.isInstanceOwnerSetUp', true);
|
config.set('userManagement.isInstanceOwnerSetUp', true);
|
||||||
|
@ -384,7 +378,7 @@ test('GET /workflows/:id should fail due to invalid API Key', async () => {
|
||||||
expect(response.statusCode).toBe(401);
|
expect(response.statusCode).toBe(401);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('GET /workflows/:id should fail due to non existing workflow', async () => {
|
test('GET /workflows/:id should fail due to non-existing workflow', async () => {
|
||||||
const owner = await testDb.createUser({ globalRole: globalOwnerRole, apiKey: randomApiKey() });
|
const owner = await testDb.createUser({ globalRole: globalOwnerRole, apiKey: randomApiKey() });
|
||||||
|
|
||||||
const authOwnerAgent = utils.createAgent(app, {
|
const authOwnerAgent = utils.createAgent(app, {
|
||||||
|
@ -495,7 +489,7 @@ test('DELETE /workflows/:id should fail due to invalid API Key', async () => {
|
||||||
expect(response.statusCode).toBe(401);
|
expect(response.statusCode).toBe(401);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('DELETE /workflows/:id should fail due to non existing workflow', async () => {
|
test('DELETE /workflows/:id should fail due to non-existing workflow', async () => {
|
||||||
const owner = await testDb.createUser({ globalRole: globalOwnerRole, apiKey: randomApiKey() });
|
const owner = await testDb.createUser({ globalRole: globalOwnerRole, apiKey: randomApiKey() });
|
||||||
|
|
||||||
const authOwnerAgent = utils.createAgent(app, {
|
const authOwnerAgent = utils.createAgent(app, {
|
||||||
|
@ -619,7 +613,7 @@ test('POST /workflows/:id/activate should fail due to invalid API Key', async ()
|
||||||
expect(response.statusCode).toBe(401);
|
expect(response.statusCode).toBe(401);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('POST /workflows/:id/activate should fail due to non existing workflow', async () => {
|
test('POST /workflows/:id/activate should fail due to non-existing workflow', async () => {
|
||||||
const owner = await testDb.createUser({ globalRole: globalOwnerRole, apiKey: randomApiKey() });
|
const owner = await testDb.createUser({ globalRole: globalOwnerRole, apiKey: randomApiKey() });
|
||||||
|
|
||||||
const authOwnerAgent = utils.createAgent(app, {
|
const authOwnerAgent = utils.createAgent(app, {
|
||||||
|
@ -781,7 +775,7 @@ test('POST /workflows/:id/deactivate should fail due to invalid API Key', async
|
||||||
expect(response.statusCode).toBe(401);
|
expect(response.statusCode).toBe(401);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('POST /workflows/:id/deactivate should fail due to non existing workflow', async () => {
|
test('POST /workflows/:id/deactivate should fail due to non-existing workflow', async () => {
|
||||||
const owner = await testDb.createUser({ globalRole: globalOwnerRole, apiKey: randomApiKey() });
|
const owner = await testDb.createUser({ globalRole: globalOwnerRole, apiKey: randomApiKey() });
|
||||||
|
|
||||||
const authOwnerAgent = utils.createAgent(app, {
|
const authOwnerAgent = utils.createAgent(app, {
|
||||||
|
@ -1036,7 +1030,7 @@ test('PUT /workflows/:id should fail due to invalid API Key', async () => {
|
||||||
expect(response.statusCode).toBe(401);
|
expect(response.statusCode).toBe(401);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('PUT /workflows/:id should fail due to non existing workflow', async () => {
|
test('PUT /workflows/:id should fail due to non-existing workflow', async () => {
|
||||||
const owner = await testDb.createUser({ globalRole: globalOwnerRole, apiKey: randomApiKey() });
|
const owner = await testDb.createUser({ globalRole: globalOwnerRole, apiKey: randomApiKey() });
|
||||||
|
|
||||||
const authOwnerAgent = utils.createAgent(app, {
|
const authOwnerAgent = utils.createAgent(app, {
|
||||||
|
|
Loading…
Reference in a new issue