Skip to content

Commit

Permalink
Updated test for notice-page to reflect new logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-tco committed Jul 17, 2023
1 parent 74f7ef7 commit b4c9bc8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.springframework.web.servlet.view.RedirectView;
import org.springframework.web.util.WebUtils;

import java.sql.Ref;
import java.util.List;
import java.util.Optional;

Expand Down Expand Up @@ -119,9 +120,12 @@ void shouldReturnDefaultRedirectUrl_IfRedirectUrlNotProvided_AndTokenIsValid() {

@Test
void showNoticePage_ShowsNoticePage_WithLoginUrl() {
when(oneLoginService.getOneLoginAuthorizeUrl())
.thenReturn("loginUrl");

final ModelAndView methodResponse = loginController.showNoticePage();
assertThat(methodResponse.getViewName()).isEqualTo(LoginControllerV2.NOTICE_PAGE_VIEW);
assertThat(methodResponse.getModel().get("loginUrl")).isEqualTo("oneLoginBaseUrl");
assertThat(methodResponse.getModel().get("loginUrl")).isEqualTo("loginUrl");

}
}
Expand Down

0 comments on commit b4c9bc8

Please sign in to comment.