test: verify customer isolation on shared appointment items
This commit is contained in:
+3
-1
@@ -81,7 +81,9 @@ class InboundPlanPaginationTest {
|
||||
String sql = String.join("", InboundPlanQueryMapper.class
|
||||
.getMethod("rows", String.class, InboundPlanRequests.Query.class, long.class, long.class)
|
||||
.getAnnotation(org.apache.ibatis.annotations.Select.class).value()) + InboundPlanQueryMapper.FROM_AND_FILTER;
|
||||
assertThat(sql).contains("a2.customer_id=#{customerId}", "ORDER BY a2.created_at DESC,ai2.id DESC LIMIT 1");
|
||||
assertThat(sql).contains("ai2.customer_id=p.customer_id", "ORDER BY a2.created_at DESC,ai2.id DESC LIMIT 1");
|
||||
assertThat(sql).contains("p.customer_id=#{customerId}", "o.customer_id=p.customer_id");
|
||||
assertThat(sql).doesNotContain("a2.customer_id=#{customerId}");
|
||||
assertThat(sql).contains("di.customer_id=p.customer_id AND di.order_id=l.order_id",
|
||||
"dispatch.customer_id=di.customer_id", "dispatch.status<>'CANCELLED'");
|
||||
assertThat(sql).contains("p.overseas_warehouse_id overseasWarehouseId", "o.overseas_warehouse_code overseasWarehouseCode",
|
||||
|
||||
Reference in New Issue
Block a user