mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Move some request DTOs to @n8n/api-types (no-changelog) (#10880)
This commit is contained in:
committed by
GitHub
parent
583d3a7acb
commit
769ddfdd1d
@@ -225,6 +225,29 @@ describe('Users in Public API', () => {
|
||||
expect(response.body).toHaveProperty('message', 'Forbidden');
|
||||
});
|
||||
|
||||
it('should return a 400 on invalid payload', async () => {
|
||||
/**
|
||||
* Arrange
|
||||
*/
|
||||
testServer.license.enable('feat:advancedPermissions');
|
||||
const owner = await createOwner({ withApiKey: true });
|
||||
const member = await createMember();
|
||||
const payload = { newRoleName: 'invalid' };
|
||||
|
||||
/**
|
||||
* Act
|
||||
*/
|
||||
const response = await testServer
|
||||
.publicApiAgentFor(owner)
|
||||
.patch(`/users/${member.id}/role`)
|
||||
.send(payload);
|
||||
|
||||
/**
|
||||
* Assert
|
||||
*/
|
||||
expect(response.status).toBe(400);
|
||||
});
|
||||
|
||||
it("should change a user's role", async () => {
|
||||
/**
|
||||
* Arrange
|
||||
|
||||
Reference in New Issue
Block a user