more tests

This commit is contained in:
Pablo Martin 2024-02-23 12:02:18 +01:00
parent 1a38466525
commit 3efcb7add7

View file

@ -242,6 +242,10 @@ sources:
- name: currency - name: currency
data_type: character varying data_type: character varying
description: "{{ doc('stripe_currency_desc') }}" description: "{{ doc('stripe_currency_desc') }}"
tests:
- not_null
- dbt_expectations.expect_column_value_lengths_to_equal:
value: 3
- name: customer - name: customer
data_type: character varying data_type: character varying
description: "ID of the customer this charge is for if one exists." description: "ID of the customer this charge is for if one exists."
@ -257,6 +261,8 @@ sources:
- name: refunded - name: refunded
data_type: boolean data_type: boolean
description: "Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false." description: "Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false."
tests:
- not_null
- name: shipping - name: shipping
data_type: jsonb data_type: jsonb
description: "Shipping information for the charge." description: "Shipping information for the charge."
@ -293,9 +299,17 @@ sources:
- name: payment_intent - name: payment_intent
data_type: character varying data_type: character varying
description: "ID of the PaymentIntent associated with this charge, if one exists." description: "ID of the PaymentIntent associated with this charge, if one exists."
tests:
- not_null
- dbt_expectations.expect_column_values_to_match_regex:
regex: "^pi_.{24}$"
- name: payment_method - name: payment_method
data_type: character varying data_type: character varying
description: "ID of the payment method used in this charge." description: "ID of the payment method used in this charge."
tests:
- not_null
- dbt_expectations.expect_column_values_to_match_regex:
regex: "^pm_.{24}$"
- name: receipt_number - name: receipt_number
data_type: character varying data_type: character varying
description: "This is the transaction number that appears on email receipts sent for this charge. This attribute will be null until a receipt has been sent." description: "This is the transaction number that appears on email receipts sent for this charge. This attribute will be null until a receipt has been sent."