mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-03-04 02:20:19 +01:00
tests
This commit is contained in:
@@ -343,7 +343,7 @@ describe('SpringAuthClient', () => {
|
||||
});
|
||||
|
||||
const result = await springAuth.signInWithOAuth({
|
||||
provider: 'github',
|
||||
provider: '/oauth2/authorization/github',
|
||||
options: { redirectTo: '/auth/callback' },
|
||||
});
|
||||
|
||||
|
||||
@@ -295,9 +295,9 @@ describe('Login', () => {
|
||||
await user.click(oauthButton);
|
||||
|
||||
await waitFor(() => {
|
||||
// Should use 'authentik' directly, NOT map to 'oidc'
|
||||
// Should use full path directly, NOT map to 'oidc'
|
||||
expect(springAuth.signInWithOAuth).toHaveBeenCalledWith({
|
||||
provider: 'authentik',
|
||||
provider: '/oauth2/authorization/authentik',
|
||||
options: { redirectTo: '/auth/callback' }
|
||||
});
|
||||
});
|
||||
@@ -338,10 +338,10 @@ describe('Login', () => {
|
||||
await user.click(oauthButton);
|
||||
|
||||
await waitFor(() => {
|
||||
// Should use 'mycompany' directly - this is the critical fix
|
||||
// Should use full path directly - this is the critical fix
|
||||
// Previously it would map unknown providers to 'oidc'
|
||||
expect(springAuth.signInWithOAuth).toHaveBeenCalledWith({
|
||||
provider: 'mycompany',
|
||||
provider: '/oauth2/authorization/mycompany',
|
||||
options: { redirectTo: '/auth/callback' }
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user