diff --git a/app/proprietary/src/test/java/stirling/software/proprietary/service/UserLicenseSettingsServiceTest.java b/app/proprietary/src/test/java/stirling/software/proprietary/service/UserLicenseSettingsServiceTest.java index 7f9445ad7..a7f8042f6 100644 --- a/app/proprietary/src/test/java/stirling/software/proprietary/service/UserLicenseSettingsServiceTest.java +++ b/app/proprietary/src/test/java/stirling/software/proprietary/service/UserLicenseSettingsServiceTest.java @@ -33,6 +33,7 @@ class UserLicenseSettingsServiceTest { @Mock private UserService userService; @Mock private ApplicationProperties applicationProperties; @Mock private ApplicationProperties.Premium premium; + @Mock private ApplicationProperties.AutomaticallyGenerated automaticallyGenerated; @Mock private LicenseKeyChecker licenseKeyChecker; @Mock private ObjectProvider licenseKeyCheckerProvider; @@ -49,6 +50,8 @@ class UserLicenseSettingsServiceTest { mockSettings.setGrandfatheredUserSignature("80:test-signature"); when(applicationProperties.getPremium()).thenReturn(premium); + when(applicationProperties.getAutomaticallyGenerated()).thenReturn(automaticallyGenerated); + when(automaticallyGenerated.getIsNewServer()).thenReturn(false); // Default: not a new server when(settingsRepository.findSettings()).thenReturn(Optional.of(mockSettings)); when(userService.getTotalUsersCount()).thenReturn(80L); when(settingsRepository.save(any(UserLicenseSettings.class))) diff --git a/frontend/src/proprietary/routes/Login.test.tsx b/frontend/src/proprietary/routes/Login.test.tsx index 218eb7efb..3d0bc87a5 100644 --- a/frontend/src/proprietary/routes/Login.test.tsx +++ b/frontend/src/proprietary/routes/Login.test.tsx @@ -382,9 +382,9 @@ describe('Login', () => { await user.click(oauthButton); await waitFor(() => { - // Should use 'oidc' when explicitly configured + // Should use full path when explicitly configured expect(springAuth.signInWithOAuth).toHaveBeenCalledWith({ - provider: 'oidc', + provider: '/oauth2/authorization/oidc', options: { redirectTo: '/auth/callback' } }); });