Skip to content

Commit 413bc2f

Browse files
authored
test(api): add a member role membership to 403 test
1 parent 671ef47 commit 413bc2f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

api/tests/team/acceptance/application/membership/membership.route.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,13 @@ describe('Acceptance | Team | Application | Route | membership', function () {
377377
it('should respond with a 403 if user does not have the role Admin in organization', async function () {
378378
// given
379379
const notOrganizationAdminUserId = databaseBuilder.factory.buildUser().id;
380+
databaseBuilder.factory.buildMembership({
381+
userId: notOrganizationAdminUserId,
382+
organizationId,
383+
organizationRole: Membership.roles.MEMBER,
384+
});
385+
await databaseBuilder.commit();
386+
380387
options.headers = generateAuthenticatedUserRequestHeaders({ userId: notOrganizationAdminUserId });
381388

382389
// when

0 commit comments

Comments
 (0)