Skip to content

Commit

Permalink
refactor: inline imageForm member
Browse files Browse the repository at this point in the history
  • Loading branch information
php-coder committed Mar 6, 2024
1 parent b7a4051 commit 44da819
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,13 @@ class SeriesServiceImplTest extends Specification {

private SeriesService service
private AddSeriesForm form
private AddImageForm imageForm

def setup() {
form = new AddSeriesForm()
form.setQuantity(Random.quantity())
form.setPerforated(Random.perforated())
form.setCategory(TestObjects.createLinkEntityDto())

imageForm = new AddImageForm()

service = new SeriesServiceImpl(
NOPLogger.NOP_LOGGER,
seriesDao,
Expand Down Expand Up @@ -87,6 +84,8 @@ class SeriesServiceImplTest extends Specification {

def "addImageToSeries() should remove image when exception occurs"() {
given:
AddImageForm imageForm = new AddImageForm()
and:
ImageInfoDto expectedImageInfo = TestObjects.createImageInfoDto()
and:
imageService.addToSeries(_ as Integer, _ as Integer) >> { throw new IllegalStateException('oops') }
Expand Down

0 comments on commit 44da819

Please sign in to comment.