Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Fix up and flesh out transaction validation specs
Browse files Browse the repository at this point in the history
These didn't include phone or email, both of which are required.
  • Loading branch information
stewart committed Sep 12, 2016
1 parent 4db6fbd commit cd82825
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion spec/models/solidus_paypal_braintree/transaction_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
{
nonce: 'abcde-fghjkl-lmnop',
payment_method: SolidusPaypalBraintree::Gateway.new,
payment_type: 'ApplePayCard'
payment_type: 'ApplePayCard',
phone: "555-1234",
email: "[email protected]"
}
end

Expand All @@ -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

0 comments on commit cd82825

Please sign in to comment.