From a22471ed032c40f34a0ebb2c1145f1cc6d73b885 Mon Sep 17 00:00:00 2001 From: Pedro Sousa Date: Mon, 11 Sep 2023 19:48:39 +0100 Subject: [PATCH] Fix ref_cte_name --- .../tests/unit/model_b_references_a.sql | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/integration-tests/tests/unit/model_b_references_a.sql b/integration-tests/tests/unit/model_b_references_a.sql index 6dd5cc1..2ddba92 100644 --- a/integration-tests/tests/unit/model_b_references_a.sql +++ b/integration-tests/tests/unit/model_b_references_a.sql @@ -14,4 +14,15 @@ select 1 as a, 'b' as b {% endcall %} {% endcall %} - \ No newline at end of file + +UNION ALL + +{% call test_condition_on_model_query('model_b_references_a', "should ", {}, + assert_should_contain, dbt_unit_testing.quote_identifier("model_a")) %} + {% call dbt_unit_testing.mock_ref ('model_a') %} + select 1 as id + {% endcall %} + {% call dbt_unit_testing.expect() %} + select 1 as id + {% endcall %} +{% endcall %}