Skip to content

Commit f1790eb

Browse files
committed
chore(CategoryServiceImplTest): use random values in getStatisticsOf() tests.
Address to #300
1 parent 694c422 commit f1790eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/groovy/ru/mystamps/web/feature/category/CategoryServiceImplTest.groovy

+3-3
Original file line numberDiff line numberDiff line change
@@ -473,17 +473,17 @@ class CategoryServiceImplTest extends Specification {
473473

474474
def 'getStatisticsOf() should throw exception when collection id is null'() {
475475
when:
476-
service.getStatisticsOf(null, 'whatever')
476+
service.getStatisticsOf(null, Random.lang())
477477
then:
478478
IllegalArgumentException ex = thrown()
479479
ex.message == 'Collection id must be non null'
480480
}
481481

482482
def 'getStatisticsOf() should pass arguments to dao'() {
483483
given:
484-
Integer expectedCollectionId = 15
484+
Integer expectedCollectionId = Random.id()
485485
and:
486-
String expectedLang = 'expected'
486+
String expectedLang = Random.lang()
487487
when:
488488
service.getStatisticsOf(expectedCollectionId, expectedLang)
489489
then:

0 commit comments

Comments
 (0)