File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
src/test/groovy/ru/mystamps/web/service Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -351,19 +351,7 @@ class SeriesServiceImplTest extends Specification {
351
351
}
352
352
353
353
@SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
354
- def " add() should assign created/updated at to current date" () {
355
- when :
356
- service. add(form, userId, false )
357
- then :
358
- 1 * seriesDao. add({ AddSeriesDbDto series ->
359
- assert DateUtils . roughlyEqual(series?. createdAt, new Date ())
360
- assert DateUtils . roughlyEqual(series?. updatedAt, new Date ())
361
- return true
362
- }) >> 123
363
- }
364
-
365
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
366
- def " add() should assign created/updated by to user" () {
354
+ def " add() should assign created/updated at/by to current date/user" () {
367
355
given :
368
356
Integer expectedUserId = 789
369
357
when :
@@ -372,6 +360,8 @@ class SeriesServiceImplTest extends Specification {
372
360
1 * seriesDao. add({ AddSeriesDbDto series ->
373
361
assert series?. createdBy == expectedUserId
374
362
assert series?. updatedBy == expectedUserId
363
+ assert DateUtils . roughlyEqual(series?. createdAt, new Date ())
364
+ assert DateUtils . roughlyEqual(series?. updatedAt, new Date ())
375
365
return true
376
366
}) >> 123
377
367
}
You can’t perform that action at this time.
0 commit comments