Skip to content

Commit

Permalink
Fix verification, mysql had unsorted elements
Browse files Browse the repository at this point in the history
  • Loading branch information
radovanradic committed Jan 28, 2025
1 parent 7622735 commit 5ac5957
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2004,16 +2004,19 @@ abstract class AbstractRepositorySpec extends Specification {
def book1 = author.getBooks().find { book -> book.title == "Book1" }
def book2 = author.getBooks().find { book -> book.title == "Book2" }
def book3 = author.getBooks().find { book -> book.title == "Book3" }
def book1pages = book1.pages.sort {it -> it.num}
def book2pages = book2.pages.sort {it -> it.num}
def book3pages = book3.pages.sort {it -> it.num}
author.books.size() == 3 &&
book1.pages.size() == 1 &&
book1.pages[0].num == 1 &&
book2.pages.size() == 2 &&
book2.pages[0].num == 21 &&
book2.pages[1].num == 22 &&
book3.pages.size() == 3 &&
book3.pages[0].num == 31 &&
book3.pages[1].num == 32 &&
book3.pages[2].num == 33
book1pages[0].num == 1 &&
book2pages.size() == 2 &&
book2pages[0].num == 21 &&
book2pages[1].num == 22 &&
book3pages.size() == 3 &&
book3pages[0].num == 31 &&
book3pages[1].num == 32 &&
book3pages[2].num == 33
}

void "test one-to-one mappedBy"() {
Expand Down

0 comments on commit 5ac5957

Please sign in to comment.