mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-02 02:11:33 +00:00
Fix credit card instance in specs
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user