File tree 4 files changed +15
-9
lines changed
main/java/ru/mystamps/web/controller
4 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 23
23
24
24
import org .springframework .stereotype .Controller ;
25
25
import org .springframework .web .bind .annotation .GetMapping ;
26
- import org .springframework .web .bind .annotation .ResponseBody ;
27
26
28
27
import static ru .mystamps .web .util .ControllerUtils .printHtml ;
29
28
30
29
@ Controller
31
30
public class TestController {
32
31
33
- @ GetMapping (path = "/test/invalid/not-image-file" , produces = "application/json" )
34
- @ ResponseBody
35
- public String simpleJson () {
36
- return "test" ;
37
- }
38
-
39
32
@ GetMapping ("/test/valid/series-info/existing-seller" )
40
33
public void seriesInfoWithExistingSeller (HttpServletResponse response ) throws IOException {
41
34
printHtml (
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ Add image with URL to an empty file
50
50
Element Text Should Be id=image-url.errors File must not be empty
51
51
52
52
Add image with URL to a file of unsupported type (not an image)
53
- Input Text id=image-url ${SITE_URL } /test/invalid /not-image-file
53
+ Input Text id=image-url ${MOCK_SERVER } /series /not-image-file
54
54
Submit Form id=add-image-form
55
55
Element Text Should Be id=image-url.errors Invalid file type
56
56
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ Create series with image URL to an empty file
67
67
Element Text Should Be id=image-url.errors File must not be empty
68
68
69
69
Create series with image URL to a file of unsupported type (not an image)
70
- Input Text id=image-url ${SITE_URL } /test/invalid /not-image-file
70
+ Input Text id=image-url ${MOCK_SERVER } /series /not-image-file
71
71
Submit Form id=add-series-form
72
72
Element Text Should Be id=image-url.errors Invalid file type
73
73
Original file line number Diff line number Diff line change
1
+ {
2
+ "request" : {
3
+ "method" : " GET" ,
4
+ "url" : " /series/not-image-file"
5
+ },
6
+ "response" : {
7
+ "status" : 200 ,
8
+ "headers" : {
9
+ "Content-Type" : " application/json"
10
+ },
11
+ "jsonBody" : " test"
12
+ }
13
+ }
You can’t perform that action at this time.
0 commit comments