From cd82825151ee2154c62e4fd57c1d9390d0fd710a Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Mon, 12 Sep 2016 16:08:16 -0700 Subject: [PATCH] Fix up and flesh out transaction validation specs These didn't include phone or email, both of which are required. --- .../solidus_paypal_braintree/transaction_spec.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/spec/models/solidus_paypal_braintree/transaction_spec.rb b/spec/models/solidus_paypal_braintree/transaction_spec.rb index 08bf9165..9aaf6673 100644 --- a/spec/models/solidus_paypal_braintree/transaction_spec.rb +++ b/spec/models/solidus_paypal_braintree/transaction_spec.rb @@ -6,7 +6,9 @@ { nonce: 'abcde-fghjkl-lmnop', payment_method: SolidusPaypalBraintree::Gateway.new, - payment_type: 'ApplePayCard' + payment_type: 'ApplePayCard', + phone: "555-1234", + email: "test@example.com" } end @@ -33,5 +35,15 @@ let(:valid_attributes) { super().except(:payment_type) } it { is_expected.to be false } end + + context 'no phone' do + let(:valid_attributes) { super().except(:phone) } + it { is_expected.to be false } + end + + context 'no email' do + let(:valid_attributes) { super().except(:email) } + it { is_expected.to be false } + end end end