Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a unit test to the jaffle_shop repo #107

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions models/staging/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
unit_tests:
- name: test_dollar_conversion # this is the unique name of the test
model: stg_payments # name of the model I'm unit testing
given: # the mock data for your inputs
- input: ref('raw_payments')
rows:
- {id: 1, amount: 1000}
- {id: 2, amount: 50}
expect: # the expected output given the inputs above
rows:
- {payment_id: 1, amount: 10}
- {payment_id: 2, amount: 0.5}