-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from mndzielski/POM-436-Recaptcha-in-dto-object
POM-436 - Recaptcha in DTO object
- Loading branch information
Showing
3 changed files
with
29 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,8 @@ void shouldSendEmailToOfferCreator() throws Exception { | |
offer.id, | ||
"message body", | ||
"[email protected]", | ||
true | ||
true, | ||
"" | ||
), Void.class); | ||
|
||
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); | ||
|
@@ -136,7 +137,8 @@ void shouldFailWhenEmailPrefixIsIncorrect() { | |
offer.id, | ||
"message body", | ||
".email@[email protected]", | ||
true | ||
true, | ||
"" | ||
), Void.class); | ||
|
||
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); | ||
|
@@ -152,7 +154,8 @@ void shouldFailWhenEmailPrefixIsIncorrect_andWhenHeaderLanguageIsPL_expectPolish | |
offer.id, | ||
"message body", | ||
".email@[email protected]", | ||
true | ||
true, | ||
"" | ||
), headers); | ||
|
||
ResponseEntity<ErrorResponse> response = restTemplate.postForEntity("/api/message", entity, ErrorResponse.class); | ||
|
@@ -175,7 +178,8 @@ void shouldFailWhenEmailPrefixIsIncorrect_andWhenHeaderLanguageIsEn_expectEnglis | |
offer.id, | ||
"message body", | ||
".email@[email protected]", | ||
true | ||
true, | ||
"" | ||
), headers); | ||
|
||
ResponseEntity<ErrorResponse> response = restTemplate.postForEntity("/api/message", entity, ErrorResponse.class); | ||
|
@@ -196,7 +200,8 @@ void shouldFailWhenEmailSuffixIsIncorrect() { | |
offer.id, | ||
"message body", | ||
"email@invalid", | ||
true | ||
true, | ||
"" | ||
), Void.class); | ||
|
||
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); | ||
|
@@ -210,7 +215,8 @@ void shouldFailWithoutAcceptingToS() { | |
offer.id, | ||
"abc", | ||
"[email protected]", | ||
false | ||
false, | ||
"" | ||
), Void.class); | ||
|
||
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); | ||
|
@@ -221,7 +227,8 @@ void shouldFailWithoutOfferId() { | |
null, | ||
"abc", | ||
"[email protected]", | ||
true | ||
true, | ||
"" | ||
), Void.class); | ||
|
||
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); | ||
|
@@ -235,7 +242,8 @@ void shouldFailWithoutEmail() { | |
offer.id, | ||
"text", | ||
"", | ||
true | ||
true, | ||
"" | ||
), Void.class); | ||
|
||
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); | ||
|
@@ -248,7 +256,8 @@ void shouldFailWhenOfferAuthorDoesNotExist() { | |
offer.id, | ||
"text", | ||
"[email protected]", | ||
true | ||
true, | ||
"" | ||
), Void.class); | ||
|
||
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); | ||
|
@@ -261,7 +270,8 @@ void shouldFailForNotExistingOffer() { | |
1L, | ||
"text", | ||
"[email protected]", | ||
true | ||
true, | ||
"" | ||
), Void.class); | ||
|
||
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); | ||
|