mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Refactor tests using assertSql() helper method
This helper method trims column alias from the sql (for Oracle)
This commit is contained in:
@@ -55,7 +55,7 @@ public class TestQueryExists extends BaseTestCase {
|
||||
|
||||
List<Order> ordersThatDontHave = query2.findList();
|
||||
|
||||
assertThat(query.getGeneratedSql()).contains(" exists (");
|
||||
assertSql(query).contains(" exists (");
|
||||
assertThat(query2.getGeneratedSql()).contains(" not exists (");
|
||||
|
||||
assertThat(ordersThatHave).isNotEmpty();
|
||||
@@ -79,7 +79,7 @@ public class TestQueryExists extends BaseTestCase {
|
||||
|
||||
query2.findList();
|
||||
|
||||
assertThat(query.getGeneratedSql()).contains(" exists (");
|
||||
assertSql(query).contains(" exists (");
|
||||
assertThat(query2.getGeneratedSql()).contains(" not exists (");
|
||||
|
||||
assertThat(customersWithContacts).isNotEmpty();
|
||||
|
||||
Reference in New Issue
Block a user