Skip to content

Commit 93130b4

Browse files
committed
/test/invalid/response-404: port to using WireMock stub.
No functional changes.
1 parent 1ea9068 commit 93130b4

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
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-404")
34-
public void notFound(HttpServletResponse response) throws IOException {
35-
response.sendError(HttpServletResponse.SC_NOT_FOUND);
36-
}
37-
3833
@GetMapping("/test/invalid/empty-jpeg-file")
3934
public void emptyJpegFile(HttpServletResponse response) {
4035
response.setContentType("image/jpeg");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Add image with URL with invalid response
3535
Element Text Should Be id=image-url.errors Could not download file
3636

3737
Add image with URL to a file that does not exist
38-
Input Text id=image-url ${SITE_URL}/test/invalid/response-404
38+
Input Text id=image-url ${MOCK_SERVER}/series/response-404
3939
Submit Form id=add-image-form
4040
Element Text Should Be id=image-url.errors File not found
4141

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Create series with image URL with invalid response
5252
Element Text Should Be id=image-url.errors Could not download file
5353

5454
Create series with image URL to a file that does not exist
55-
Input Text id=image-url ${SITE_URL}/test/invalid/response-404
55+
Input Text id=image-url ${MOCK_SERVER}/series/response-404
5656
Submit Form id=add-series-form
5757
Element Text Should Be id=image-url.errors File not found
5858

src/test/robotframework/series/import/request-logic.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Import series and series sale with a new seller from an external site
139139
Element Should Be Disabled id=seller-url
140140

141141
Submit a request that will fail to download a file
142-
Input Text id=url ${SITE_URL}/test/invalid/response-404
142+
Input Text id=url ${MOCK_SERVER}/series/response-404
143143
Submit Form id=import-series-form
144144
Element Text Should Be id=request-status DownloadingFailed
145145

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-404"
5+
},
6+
"response": {
7+
"status": 404
8+
}
9+
}

0 commit comments

Comments
 (0)