mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Update tests only - handle MySql specifics (boolean literal, lack of order by nulls last)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.avaje.tests.query.softdelete;
|
||||
|
||||
import com.avaje.ebean.BaseTestCase;
|
||||
import com.avaje.ebean.Ebean;
|
||||
import com.avaje.ebean.PagedList;
|
||||
import com.avaje.tests.model.onetoone.album.Cover;
|
||||
@@ -11,7 +12,7 @@ import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class TestSoftDeletePagingList {
|
||||
public class TestSoftDeletePagingList extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
@@ -41,9 +42,17 @@ public class TestSoftDeletePagingList {
|
||||
|
||||
assertThat(sql).hasSize(2);
|
||||
assertThat(sql.get(0)).contains("select count(*) from cover t0 where t0.s3url like");
|
||||
assertThat(sql.get(0)).contains("and coalesce(t0.deleted,false)=false; --bind(SoftDelPaged-%)");
|
||||
if (isPlatformBooleanNative()) {
|
||||
assertThat(sql.get(0)).contains("and coalesce(t0.deleted,false)=false; --bind(SoftDelPaged-%)");
|
||||
} else {
|
||||
assertThat(sql.get(0)).contains("and coalesce(t0.deleted,0)=0; --bind(SoftDelPaged-%)");
|
||||
}
|
||||
|
||||
assertThat(sql.get(1)).contains("where t0.s3url like ");
|
||||
assertThat(sql.get(1)).contains("and coalesce(t0.deleted,false)=false order by t0.id");
|
||||
if (isPlatformBooleanNative()) {
|
||||
assertThat(sql.get(1)).contains("and coalesce(t0.deleted,false)=false order by t0.id");
|
||||
} else {
|
||||
assertThat(sql.get(1)).contains("and coalesce(t0.deleted,0)=0 order by t0.id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user