From 82161f028e55e59befc6147a905b45585f9323a7 Mon Sep 17 00:00:00 2001 From: Ali BARIN Date: Tue, 10 Sep 2024 10:21:42 +0000 Subject: [PATCH] test(create-step): state permission conditions explicitly --- .../backend/src/controllers/api/v1/flows/create-step.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/controllers/api/v1/flows/create-step.test.js b/packages/backend/src/controllers/api/v1/flows/create-step.test.js index 4d90dfba..d41408ba 100644 --- a/packages/backend/src/controllers/api/v1/flows/create-step.test.js +++ b/packages/backend/src/controllers/api/v1/flows/create-step.test.js @@ -20,12 +20,14 @@ describe('POST /api/v1/flows/:flowId/steps', () => { roleId: currentUser.roleId, subject: 'Flow', action: 'read', + conditions: ['isCreator'], }); await createPermission({ roleId: currentUser.roleId, subject: 'Flow', action: 'update', + conditions: ['isCreator'], }); flow = await createFlow({ userId: currentUser.id }); @@ -36,7 +38,7 @@ describe('POST /api/v1/flows/:flowId/steps', () => { token = await createAuthTokenByUserId(currentUser.id); }); - it('should return created step', async () => { + it('should return created step for current user', async () => { const response = await request(app) .post(`/api/v1/flows/${flow.id}/steps`) .set('Authorization', token)