@@ -449,8 +449,8 @@ class CountryServiceImplTest extends Specification {
449
449
450
450
def ' suggestCountryForUser() should return country of the last created series' () {
451
451
given :
452
- Integer expectedUserId = 18
453
- String expectedSlug = ' brazil '
452
+ Integer expectedUserId = Random . userId()
453
+ String expectedSlug = Random . countrySlug()
454
454
when :
455
455
String slug = service. suggestCountryForUser(expectedUserId)
456
456
then :
@@ -461,8 +461,8 @@ class CountryServiceImplTest extends Specification {
461
461
462
462
def ' suggestCountryForUser() should return popular country from collection' () {
463
463
given :
464
- Integer expectedUserId = 19
465
- String expectedSlug = ' mexica '
464
+ Integer expectedUserId = Random . userId()
465
+ String expectedSlug = Random . countrySlug()
466
466
when :
467
467
String slug = service. suggestCountryForUser(expectedUserId)
468
468
then :
@@ -473,8 +473,8 @@ class CountryServiceImplTest extends Specification {
473
473
474
474
def ' suggestCountryForUser() should return a recently created country' () {
475
475
given :
476
- Integer expectedUserId = 21
477
- String expectedSlug = ' spain '
476
+ Integer expectedUserId = Random . userId()
477
+ String expectedSlug = Random . countrySlug()
478
478
when :
479
479
String slug = service. suggestCountryForUser(expectedUserId)
480
480
then :
@@ -485,7 +485,7 @@ class CountryServiceImplTest extends Specification {
485
485
486
486
def ' suggestCountryForUser() should return null when cannot suggest' () {
487
487
when :
488
- String slug = service. suggestCountryForUser(20 )
488
+ String slug = service. suggestCountryForUser(Random . userId() )
489
489
then :
490
490
1 * countryDao. findCountryOfLastCreatedSeriesByUser(_ as Integer ) >> null
491
491
1 * countryDao. findPopularCountryInCollection(_ as Integer ) >> null
0 commit comments