File tree 4 files changed +15
-8
lines changed
main/java/ru/mystamps/web/controller
4 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 30
30
@ Controller
31
31
public class TestController {
32
32
33
- @ GetMapping ("/test/invalid/empty-jpeg-file" )
34
- public void emptyJpegFile (HttpServletResponse response ) {
35
- response .setContentType ("image/jpeg" );
36
- response .setContentLength (0 );
37
- }
38
-
39
33
@ GetMapping (path = "/test/invalid/not-image-file" , produces = "application/json" )
40
34
@ ResponseBody
41
35
public String simpleJson () {
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ Add image with URL that causes a redirect
45
45
Element Text Should Be id=image-url.errors URL must not redirect to another address
46
46
47
47
Add image with URL to an empty file
48
- Input Text id=image-url ${SITE_URL } /test/invalid /empty-jpeg-file
48
+ Input Text id=image-url ${MOCK_SERVER } /series /empty-jpeg-file
49
49
Submit Form id=add-image-form
50
50
Element Text Should Be id=image-url.errors File must not be empty
51
51
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ Create series with image URL that causes a redirect
62
62
Element Text Should Be id=image-url.errors URL must not redirect to another address
63
63
64
64
Create series with image URL to an empty file
65
- Input Text id=image-url ${SITE_URL } /test/invalid /empty-jpeg-file
65
+ Input Text id=image-url ${MOCK_SERVER } /series /empty-jpeg-file
66
66
Submit Form id=add-series-form
67
67
Element Text Should Be id=image-url.errors File must not be empty
68
68
Original file line number Diff line number Diff line change
1
+ {
2
+ "request" : {
3
+ "method" : " GET" ,
4
+ "url" : " /series/empty-jpeg-file"
5
+ },
6
+ "response" : {
7
+ "status" : 200 ,
8
+ "headers" : {
9
+ "Content-Type" : " image/jpeg" ,
10
+ "Content-Length" : " 0"
11
+ }
12
+ }
13
+ }
You can’t perform that action at this time.
0 commit comments