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:
@@ -69,9 +69,9 @@ public class TestQueryForUpdate extends BaseTestCase {
|
||||
List<String> sql = LoggedSqlCollector.stop();
|
||||
assertThat(sql).hasSize(2);
|
||||
if (isH2() || isPostgres()) {
|
||||
assertThat(sql.get(0)).contains("from e_basic t0 where t0.id =");
|
||||
assertThat(sql.get(1)).contains("from e_basic t0 where t0.id =");
|
||||
assertThat(sql.get(1)).contains("for update");
|
||||
assertSql(sql.get(0)).contains("from e_basic t0 where t0.id =");
|
||||
assertSql(sql.get(1)).contains("from e_basic t0 where t0.id =");
|
||||
assertSql(sql.get(1)).contains("for update");
|
||||
}
|
||||
|
||||
transaction.end();
|
||||
|
||||
Reference in New Issue
Block a user