mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Extract SAML requests payloads into DTOs (#12435)
This commit is contained in:
committed by
GitHub
parent
2241eef8cf
commit
552cff1860
@@ -34,6 +34,8 @@ beforeAll(async () => {
|
||||
authMemberAgent = testServer.authAgentFor(someUser);
|
||||
});
|
||||
|
||||
beforeEach(async () => await enableSaml(false));
|
||||
|
||||
describe('Instance owner', () => {
|
||||
describe('PATCH /me', () => {
|
||||
test('should succeed with valid inputs', async () => {
|
||||
@@ -89,6 +91,17 @@ describe('Instance owner', () => {
|
||||
.expect(200);
|
||||
expect(getCurrentAuthenticationMethod()).toBe('saml');
|
||||
});
|
||||
|
||||
test('should return 400 on invalid config', async () => {
|
||||
await authOwnerAgent
|
||||
.post('/sso/saml/config')
|
||||
.send({
|
||||
...sampleConfig,
|
||||
loginBinding: 'invalid',
|
||||
})
|
||||
.expect(400);
|
||||
expect(getCurrentAuthenticationMethod()).toBe('email');
|
||||
});
|
||||
});
|
||||
|
||||
describe('POST /sso/saml/config/toggle', () => {
|
||||
|
||||
Reference in New Issue
Block a user