Skip to content

Commit

Permalink
fix: test failing on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
bayang committed Jun 16, 2022
1 parent 98ace19 commit f5e92d7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ class ShelfServiceTest(
fun testDeletingTagDeletesCorrespondingShelves() {
shelfService.find(user(), null, null)
.forEach { shelfService.delete(it.id!!) }
var tags = bookService.findAllTags(null, Pageable.ofSize(200))
tags.forEach { bookService.deleteTagById(it.id!!) }
val tag = bookService.save(TagDto(null, null, null, "my-tag-shelf"))
Assertions.assertNotNull(tag.creationDate)
Assertions.assertNotNull(tag.modificationDate)
Assertions.assertNotNull(tag.id)
Assertions.assertEquals("my-tag-shelf", tag.name)
var tags = bookService.findAllTags(null, Pageable.ofSize(100))
tags = bookService.findAllTags(null, Pageable.ofSize(100))
Assertions.assertEquals(1, tags.totalElements)
val saved = shelfService.save(CreateShelfDto(tag.name, tag.id!!), user())
Assertions.assertEquals(tag.name, saved.name)
Expand Down

0 comments on commit f5e92d7

Please sign in to comment.