Conditions with SimpleExpressions get properly rendered.

This commit contains just a test to verify this.
The actual fix happened as part of #1018.

Closes #1009.
Original pull request #1015
See #1018
This commit is contained in:
Jens Schauder
2021-07-22 11:43:40 +02:00
committed by Mark Paluch
parent 9844f40580
commit 520134dc73

View File

@@ -176,6 +176,21 @@ class SelectRendererUnitTests {
+ "OR employee.tenant != department.tenant");
}
@Test // GH-1009
public void shouldRenderJoinWithJustExpression() {
Table employee = SQL.table("employee");
Table department = SQL.table("department");
Select select = Select.builder().select(employee.column("id"), department.column("name")).from(employee) //
.join(department)
.on(Expressions.just("alpha")).equals(Expressions.just("beta")) //
.build();
assertThat(SqlRenderer.toString(select)).isEqualTo("SELECT employee.id, department.name FROM employee "
+ "JOIN department ON alpha = beta");
}
@Test // DATAJDBC-309
void shouldRenderMultipleJoinWithAnd() {