summaryrefslogtreecommitdiffstats
path: root/src/test/java/com/iciql/test/ModelsTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/iciql/test/ModelsTest.java')
-rw-r--r--src/test/java/com/iciql/test/ModelsTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/java/com/iciql/test/ModelsTest.java b/src/test/java/com/iciql/test/ModelsTest.java
index 683e494..ff27bf5 100644
--- a/src/test/java/com/iciql/test/ModelsTest.java
+++ b/src/test/java/com/iciql/test/ModelsTest.java
@@ -147,4 +147,17 @@ public class ModelsTest {
assertEquals(0, models.get(0).length());
}
}
+
+ @Test
+ public void testDiscreteUpdateStringTrimming() {
+ List<SupportedTypes> original = SupportedTypes.createList();
+ db.insertAll(original);
+ SupportedTypes s1 = db.from(SupportedTypes.SAMPLE).where(SupportedTypes.SAMPLE.id).is(1).selectFirst();
+ db.from(SupportedTypes.SAMPLE)
+ .set(SupportedTypes.SAMPLE.myString)
+ .to(s1.myString + s1.myString + s1.myString + s1.myString)
+ .update();
+ SupportedTypes s2 = db.from(SupportedTypes.SAMPLE).where(SupportedTypes.SAMPLE.id).is(1).selectFirst();
+ assertEquals(40, s2.myString.length());
+ }
}