Fix credit card instance in specs

This commit is contained in:
Pau Perez
2020-06-26 12:10:21 +02:00
parent 06aa56164f
commit abacd06f6b
2 changed files with 5 additions and 6 deletions

View File

@@ -198,10 +198,6 @@ FactoryBot.modify do
country { Spree::Country.find_by name: 'Australia' || Spree::Country.first }
end
factory :credit_card do
cc_type 'visa'
end
factory :payment do
transient do
distributor {

View File

@@ -13,8 +13,11 @@ describe Spree::Payment do
end
let(:card) do
mock_model(Spree::CreditCard, :number => "4111111111111111",
:has_payment_profile? => true)
create(:credit_card, :number => "4111111111111111")
end
before do
allow(card).to receive(:has_payment_profile?).and_return(true)
end
let(:payment) do