Skip to content

Commit

Permalink
chore: ches address (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj authored Apr 9, 2024
1 parent 606fa04 commit 7980215
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public Mono<String> sendEmail(ChesRequestDto requestContent, String subject) {
.flatMap(token ->
chesApi
.post()
.uri("/mail")
.uri("/email")
.header(HttpHeaders.AUTHORIZATION, "Bearer " + token)
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.body(Mono.just(request), ChesMailRequest.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void init() {

chesStub
.stubFor(
post("/chess/uri/mail")
post("/chess/uri/email")
.willReturn(
ok(TestConstants.CHES_SUCCESS_MESSAGE)
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
Expand Down Expand Up @@ -132,7 +132,7 @@ void shouldRejectForbidden() {
void shouldSendEmail() {
chesStub
.stubFor(
post("/chess/uri/mail")
post("/chess/uri/email")
.willReturn(
ok(TestConstants.CHES_SUCCESS_MESSAGE)
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void shouldNotSendMailWhenTokenInvalid() {
mockOAuthSuccess();

wireMockExtension
.stubFor(post("/chess/uri/mail").willReturn(unauthorized()));
.stubFor(post("/chess/uri/email").willReturn(unauthorized()));

service
.sendEmail(new ChesRequestDto(List.of("[email protected]"), "simple body"), "Test")
Expand All @@ -79,7 +79,7 @@ void shouldNotSendMailWhenNoRoleInvalid() {
mockOAuthSuccess();

wireMockExtension
.stubFor(post("/chess/uri/mail").willReturn(forbidden()));
.stubFor(post("/chess/uri/email").willReturn(forbidden()));

service
.sendEmail(new ChesRequestDto(List.of("[email protected]"), "simple body"), "Test")
Expand All @@ -99,7 +99,7 @@ void shouldSendMailWhenAuth(ChesRequestDto body) {

wireMockExtension
.stubFor(
post("/chess/uri/mail")
post("/chess/uri/email")
.willReturn(
ok(TestConstants.CHES_SUCCESS_MESSAGE)
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
Expand All @@ -121,7 +121,7 @@ void shouldFailWith422() {

wireMockExtension
.stubFor(
post("/chess/uri/mail")
post("/chess/uri/email")
.willReturn(
status(422)
.withBody(TestConstants.CHES_422_MESSAGE)
Expand All @@ -144,7 +144,7 @@ void shouldSendMailWithNoBody() {

wireMockExtension
.stubFor(
post("/chess/uri/mail")
post("/chess/uri/email")
.willReturn(
status(400)
.withBody(TestConstants.CHES_400_MESSAGE)
Expand All @@ -167,7 +167,7 @@ void shouldFailWith500() {

wireMockExtension
.stubFor(
post("/chess/uri/mail")
post("/chess/uri/email")
.willReturn(
status(500)
.withBody(TestConstants.CHES_500_MESSAGE)
Expand All @@ -191,7 +191,7 @@ void shouldSendMailMultipleDestination() {

wireMockExtension
.stubFor(
post("/chess/uri/mail")
post("/chess/uri/email")
.willReturn(
ok(TestConstants.CHES_SUCCESS_MESSAGE)
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
Expand Down

0 comments on commit 7980215

Please sign in to comment.