Skip to content

Commit

Permalink
Add invalid unit test and a valid example using csv
Browse files Browse the repository at this point in the history
  • Loading branch information
joellabes committed Feb 6, 2024
1 parent 834ab17 commit 2d03949
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
10 changes: 9 additions & 1 deletion tests/latest/invalid/dbt_yml_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,12 @@ metrics:
description: "The number of paid customers using the product"

calculation_method: derived
expression: "{{ metric('new_customers') }} * 2"
expression: "{{ metric('new_customers') }} * 2"


unit_tests:
- name: some_unit_test
expect:
rows: |
col_1,col_2
val_1,val_2
16 changes: 15 additions & 1 deletion tests/latest/valid/dbt_yml_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,21 @@ unit_tests:
my_first_var: 12345
vars:
my_second_var: 689


- name: my_inline_csv_unit_test
given:
- input: ref('model_b')
format: csv
rows: |
column_1,column_2,column_3
value_1,value_2,value_3
value_4,value_5,value_6
model: my_model_1
expect:
format: csv
rows: |
count
2
snapshots:
- name: snapshot_name
Expand Down

0 comments on commit 2d03949

Please sign in to comment.