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

Remove Transaction#phone validation #140

Merged
merged 1 commit into from
Dec 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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