Skip to content

Commit 1ea9068

Browse files
committed
/test/invalid/response-400: port to using WireMock stub.
No functional changes.
1 parent 105647d commit 1ea9068

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

src/main/java/ru/mystamps/web/controller/TestController.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@
3030
@Controller
3131
public class TestController {
3232

33-
@GetMapping("/test/invalid/response-400")
34-
public void badRequest(HttpServletResponse response) throws IOException {
35-
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
36-
}
37-
3833
@GetMapping("/test/invalid/response-404")
3934
public void notFound(HttpServletResponse response) throws IOException {
4035
response.sendError(HttpServletResponse.SC_NOT_FOUND);

src/test/robotframework/series/add-image/validation.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Add image with invalid URL
3030
Element Text Should Be id=image-url.errors Value must be a valid URL
3131

3232
Add image with URL with invalid response
33-
Input Text id=image-url ${SITE_URL}/test/invalid/response-400
33+
Input Text id=image-url ${MOCK_SERVER}/series/response-400
3434
Submit Form id=add-image-form
3535
Element Text Should Be id=image-url.errors Could not download file
3636

src/test/robotframework/series/creation/validation-admin.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Create series with invalid image URL
4747
Element Text Should Be id=image-url.errors Value must be a valid URL
4848

4949
Create series with image URL with invalid response
50-
Input Text id=image-url ${SITE_URL}/test/invalid/response-400
50+
Input Text id=image-url ${MOCK_SERVER}/series/response-400
5151
Submit Form id=add-series-form
5252
Element Text Should Be id=image-url.errors Could not download file
5353

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"request": {
3+
"method": "GET",
4+
"url": "/series/response-400"
5+
},
6+
"response": {
7+
"status": 400
8+
}
9+
}

0 commit comments

Comments
 (0)