feat: Implement isOwner flag for get flows API endpoint
This commit is contained in:
@@ -6,7 +6,7 @@ import { createUser } from '../../../../../test/factories/user.js';
|
||||
import { createFlow } from '../../../../../test/factories/flow.js';
|
||||
import { createStep } from '../../../../../test/factories/step.js';
|
||||
import { createPermission } from '../../../../../test/factories/permission.js';
|
||||
import getFlowsMock from '../../../../../test/mocks/rest/api/v1/flows/get-flows.js';
|
||||
import getFlowsMock from '../../../../../test/mocks/rest/api/v1/apps/get-flows.js';
|
||||
|
||||
describe('GET /api/v1/apps/:appKey/flows', () => {
|
||||
let currentUser, currentUserRole, token;
|
||||
|
||||
@@ -7,7 +7,7 @@ import { createConnection } from '../../../../../test/factories/connection.js';
|
||||
import { createFlow } from '../../../../../test/factories/flow.js';
|
||||
import { createStep } from '../../../../../test/factories/step.js';
|
||||
import { createPermission } from '../../../../../test/factories/permission.js';
|
||||
import getFlowsMock from '../../../../../test/mocks/rest/api/v1/flows/get-flows.js';
|
||||
import getFlowsMock from '../../../../../test/mocks/rest/api/v1/connections/get-flows.js';
|
||||
|
||||
describe('GET /api/v1/connections/:connectionId/flows', () => {
|
||||
let currentUser, currentUserRole, token;
|
||||
|
||||
@@ -61,7 +61,8 @@ describe('GET /api/v1/flows', () => {
|
||||
actionStepFlowOne,
|
||||
triggerStepFlowTwo,
|
||||
actionStepFlowTwo,
|
||||
]
|
||||
],
|
||||
currentUser.id
|
||||
);
|
||||
|
||||
expect(response.body).toStrictEqual(expectedPayload);
|
||||
@@ -111,7 +112,8 @@ describe('GET /api/v1/flows', () => {
|
||||
actionStepFlowOne,
|
||||
triggerStepFlowTwo,
|
||||
actionStepFlowTwo,
|
||||
]
|
||||
],
|
||||
currentUser.id
|
||||
);
|
||||
|
||||
expect(response.body).toStrictEqual(expectedPayload);
|
||||
@@ -184,7 +186,8 @@ describe('GET /api/v1/flows', () => {
|
||||
actionStepFlowTwo,
|
||||
triggerStepFlowThree,
|
||||
actionStepFlowThree,
|
||||
]
|
||||
],
|
||||
currentUser.id
|
||||
);
|
||||
|
||||
expect(response.body).toStrictEqual(expectedPayload);
|
||||
@@ -270,7 +273,8 @@ describe('GET /api/v1/flows', () => {
|
||||
actionStepFlowThree,
|
||||
triggerStepFlowFour,
|
||||
actionStepFlowFour,
|
||||
]
|
||||
],
|
||||
currentUser.id
|
||||
);
|
||||
|
||||
expect(response.body).toStrictEqual(expectedPayload);
|
||||
@@ -356,7 +360,8 @@ describe('GET /api/v1/flows', () => {
|
||||
actionStepFlowOne,
|
||||
triggerStepFlowTwo,
|
||||
actionStepFlowTwo,
|
||||
]
|
||||
],
|
||||
currentUser.id
|
||||
);
|
||||
|
||||
expect(response.body).toStrictEqual(expectedPayload);
|
||||
|
||||
Reference in New Issue
Block a user