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

Commit

Permalink
Remove Transaction#phone validation
Browse files Browse the repository at this point in the history
There are situations, on Solidus or on Paypal, where we may have addresses
without a phone number
  • Loading branch information
alepore committed Dec 4, 2017
1 parent e204e40 commit 0d11b7b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion app/models/solidus_paypal_braintree/transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class Transaction
validates :nonce, presence: true
validates :payment_method, presence: true
validates :payment_type, presence: true
validates :phone, presence: true
validates :email, presence: true

validate do
Expand Down
6 changes: 0 additions & 6 deletions spec/models/solidus_paypal_braintree/transaction_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
nonce: 'abcde-fghjkl-lmnop',
payment_method: SolidusPaypalBraintree::Gateway.new,
payment_type: 'ApplePayCard',
phone: "555-1234",
email: "[email protected]"
}
end
Expand Down Expand Up @@ -51,11 +50,6 @@
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 }
Expand Down

0 comments on commit 0d11b7b

Please sign in to comment.