mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-02 16:22:27 +00:00
#465 - The encrypt key is logged out in sql statement - when included in where predicate
This commit is contained in:
1 parent
6450ba219c
commit
debd8ad617
9 files changed
+136
-71
No files matched your search
@@ -3,6 +3,7 @@ package com.avaje.tests.basic.encrypt;
|
||||
import java.sql.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.avaje.ebeantest.LoggedSqlCollector;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
@@ -16,8 +17,24 @@ import com.avaje.ebean.config.dbplatform.DbEncrypt;
|
||||
import com.avaje.ebeaninternal.api.SpiEbeanServer;
|
||||
import com.avaje.tests.model.basic.EBasicEncrypt;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class TestEncrypt extends BaseTestCase {
|
||||
|
||||
|
||||
@Test
|
||||
public void testQueryBind() {
|
||||
|
||||
LoggedSqlCollector.start();
|
||||
Ebean.find(EBasicEncrypt.class)
|
||||
.where().startsWith("description", "Rob")
|
||||
.findList();
|
||||
|
||||
List<String> loggedSql = LoggedSqlCollector.stop();
|
||||
assertThat(loggedSql).hasSize(1);
|
||||
assertThat(loggedSql.get(0)).contains("; --bind(****,Rob%)");
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
Reference in new issue
Block a user