mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Fix tests for #1016
This commit is contained in:
@@ -3,8 +3,9 @@ package io.ebeaninternal.server.expression;
|
||||
import io.ebean.BaseTestCase;
|
||||
import io.ebean.Ebean;
|
||||
import io.ebean.Query;
|
||||
import org.tests.model.basic.Customer;
|
||||
import org.junit.Test;
|
||||
import org.tests.model.basic.Customer;
|
||||
import org.tests.model.onetoone.album.Cover;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -25,6 +26,16 @@ public class NoopExpressionTest extends BaseTestCase {
|
||||
assertThat(generatedSql).contains("select t0.id from o_customer t0 where 1=1");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_withSoftDeleteBean() {
|
||||
|
||||
Query<Cover> query = Ebean.find(Cover.class)
|
||||
.where().add(NoopExpression.INSTANCE)
|
||||
.query();
|
||||
|
||||
query.findCount();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_withPreAndPost() {
|
||||
|
||||
@@ -38,7 +49,7 @@ public class NoopExpressionTest extends BaseTestCase {
|
||||
query.findList();
|
||||
String generatedSql = sqlOf(query);
|
||||
|
||||
assertThat(generatedSql).contains("select t0.id from o_customer t0 where t0.name is null and 1=1 and t0.status is not null");
|
||||
assertThat(generatedSql).contains("select t0.id from o_customer t0 where t0.name is null and 1=1 and t0.status is not null");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user