Skip to content

Commit

Permalink
Fix redirect when not authenticated test
Browse files Browse the repository at this point in the history
When OIDC is used the redirect path is different. With this change the
correct path is checked when using OIDC.
  • Loading branch information
emilpaw committed Jun 6, 2022
1 parent 38ad4b7 commit a0eb86d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('private-route component', () => {
expect(container.innerHTML).toEqual('<div>Test</div>');
});

it('Should redirect to login when not authenticated', () => {
it('Should redirect when not authenticated', () => {
const { container } = wrapper(
<Routes>
<Route
Expand All @@ -99,7 +99,7 @@ describe('private-route component', () => {
</PrivateRoute>
}
/>
<Route path="login" element={<div>Login</div>} />
<Route path="<% if(authenticationTypeOauth2) { %>/oauth2/authorization/oidc<% } else { %>/login<% } %>" element={<div>Login</div>} />
</Routes>,
{
isAuthenticated: false,
Expand Down

0 comments on commit a0eb86d

Please sign in to comment.