File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed
src/test/groovy/ru/mystamps/web/service Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -52,28 +52,18 @@ class DatabaseImagePersistenceStrategyTest extends Specification {
52
52
}
53
53
54
54
@SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
55
- def " save() should pass file content to image data dao" () {
55
+ def " save() should pass dto to image data dao" () {
56
56
given :
57
+ Integer expectedImageId = imageInfoDto. id
58
+ and :
57
59
byte [] expected = ' test' . bytes
58
60
multipartFile. bytes >> expected
59
61
when :
60
62
strategy. save(multipartFile, imageInfoDto)
61
- then :
62
- 1 * imageDataDao. add({ AddImageDataDbDto imageData ->
63
- assert imageData?. content == expected
64
- return true
65
- })
66
- }
67
-
68
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
69
- def " save() should pass image to image data dao" () {
70
- given :
71
- Integer expectedImageId = imageInfoDto. id
72
- when :
73
- strategy. save(multipartFile, imageInfoDto)
74
63
then :
75
64
1 * imageDataDao. add({ AddImageDataDbDto imageData ->
76
65
assert imageData?. imageId == expectedImageId
66
+ assert imageData?. content == expected
77
67
return true
78
68
})
79
69
}
You can’t perform that action at this time.
0 commit comments