From 938001ab3f163c569fa8f3c44bb15c5bc4885977 Mon Sep 17 00:00:00 2001 From: Grace Goheen Date: Tue, 20 Feb 2024 09:47:13 -0700 Subject: [PATCH] added a unit test --- models/staging/unit_tests.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 models/staging/unit_tests.yml diff --git a/models/staging/unit_tests.yml b/models/staging/unit_tests.yml new file mode 100644 index 000000000..d95fd0f26 --- /dev/null +++ b/models/staging/unit_tests.yml @@ -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} \ No newline at end of file