Skip to content

Commit 75fd26c

Browse files
committed
chore: fix a unit test for the case when userId is null
Correction for 899ff5e commit. Relate to #1505
1 parent 899ff5e commit 75fd26c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/groovy/ru/mystamps/web/feature/series/SeriesServiceImplTest.groovy

+3-2
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,9 @@ class SeriesServiceImplTest extends Specification {
736736
@SuppressWarnings('UnnecessaryObjectReferences')
737737
def "findFullInfoById() should return info about series"() {
738738
given:
739+
Integer userId = nullOr(Random.userId())
740+
Integer expectedUserId = userId == null ? 0 : userId
739741
Integer expectedSeriesId = Random.id()
740-
Integer expectedUserId = nullOr(Random.userId())
741742
String expectedLang = Random.lang()
742743
SeriesFullInfoDto expectedInfo = TestObjects.createSeriesFullInfoDto()
743744
List<String> expectedMichelNumbers = [ '1', '2' ]
@@ -748,7 +749,7 @@ class SeriesServiceImplTest extends Specification {
748749
List<String> expectedSolovyovNumbers = Random.solovyovNumbers().toList()
749750
List<Integer> expectedImageIds = Random.listOfIntegers()
750751
when:
751-
SeriesDto result = service.findFullInfoById(expectedSeriesId, expectedUserId, expectedLang, false)
752+
SeriesDto result = service.findFullInfoById(expectedSeriesId, userId, expectedLang, false)
752753
then:
753754
1 * seriesDao.findByIdAsSeriesFullInfo(expectedSeriesId, expectedUserId, expectedLang) >> expectedInfo
754755
and:

0 commit comments

Comments
 (0)