Created
April 24, 2024 04:16
-
-
Save lightle/5ef46597bbc196171ac316e0d04ca06c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
# available only for dbt 1.8 | |
unit_tests: | |
- name: test_is_last_day_of_month | |
description: "Check of model last_day_of_month_orders correctly filter for last day of month orders" | |
model: last_day_of_month_orders | |
given: | |
- input: ref('clean_orders') | |
rows: | |
- {order_datetime: '2022-12-31'} | |
- {order_datetime: '2023-03-01'} | |
- {order_datetime: '2022-05-15'} | |
- {order_datetime: '2021-04-30'} | |
expect: | |
rows: | |
- {order_datetime: '2022-12-31'} | |
- {order_datetime: '2021-04-30'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment