Skip to content

Commit

Permalink
update account and private-route tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yhao3 committed Jun 8, 2024
1 parent d9bc070 commit 193ca8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe('private-route component', () => {
</PrivateRoute>
}
/>
<Route path="<% if(authenticationTypeOauth2) { %>/oauth2/authorization/oidc<% } else { %>/login<% } %>" element={<div>Login</div>} />
<Route path="<% if(authenticationTypeOauth2) { %>/sign-in<% } else { %>/login<% } %>" element={<div>Login</div>} />
</Routes>,
{
isAuthenticated: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ describe('AccountMenu', () => {
it('Renders a guest AccountMenu component', () => {
const html = guestWrapper();

<%_ if (authenticationTypeOauth2) { _%>
expect(html).toContain(getLoginUrl());
<%_ } else { _%>
<%_ if (!authenticationTypeOauth2) { _%>
expect(html).toContain('/login');
<%_ } _%>
expect(html).not.toContain('/logout');
Expand Down

0 comments on commit 193ca8d

Please sign in to comment.