mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
Fix syntax for nil properties
This commit is contained in:
@@ -25,7 +25,7 @@ FactoryBot.define do
|
||||
firstname { FFaker::Name.first_name }
|
||||
lastname { FFaker::Name.last_name }
|
||||
address1 { FFaker::Address.street_address }
|
||||
address2 nil
|
||||
address2 { nil }
|
||||
phone { FFaker::PhoneNumber.phone_number }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -11,7 +11,7 @@ FactoryBot.define do
|
||||
factory :line_item_with_shipment, parent: :line_item do
|
||||
transient do
|
||||
shipping_fee { 3 }
|
||||
shipping_method nil
|
||||
shipping_method { nil }
|
||||
end
|
||||
|
||||
after(:build) do |line_item, evaluator|
|
||||
|
||||
@@ -106,8 +106,8 @@ FactoryBot.define do
|
||||
end
|
||||
|
||||
factory :undated_order_cycle, parent: :simple_order_cycle do
|
||||
orders_open_at nil
|
||||
orders_close_at nil
|
||||
orders_open_at { nil }
|
||||
orders_close_at { nil }
|
||||
end
|
||||
|
||||
factory :upcoming_order_cycle, parent: :simple_order_cycle do
|
||||
|
||||
@@ -8,7 +8,7 @@ FactoryBot.define do
|
||||
|
||||
user
|
||||
bill_address
|
||||
completed_at nil
|
||||
completed_at { nil }
|
||||
email { user.email }
|
||||
|
||||
factory :order_with_totals do
|
||||
|
||||
@@ -8,7 +8,7 @@ FactoryBot.define do
|
||||
cost_price { 17.00 }
|
||||
sku { 'ABC' }
|
||||
available_on { 1.year.ago }
|
||||
deleted_at nil
|
||||
deleted_at { nil }
|
||||
|
||||
supplier { Enterprise.is_primary_producer.first || FactoryBot.create(:supplier_enterprise) }
|
||||
primary_taxon { Spree::Taxon.first || FactoryBot.create(:taxon) }
|
||||
@@ -69,7 +69,7 @@ FactoryBot.define do
|
||||
transient do
|
||||
tax_rate_amount { 0 }
|
||||
tax_rate_name { "" }
|
||||
zone nil
|
||||
zone { nil }
|
||||
end
|
||||
|
||||
tax_category { create(:tax_category) }
|
||||
|
||||
@@ -4,6 +4,6 @@ FactoryBot.define do
|
||||
factory :taxon, class: Spree::Taxon do
|
||||
name { 'Ruby on Rails' }
|
||||
taxonomy
|
||||
parent_id nil
|
||||
parent_id { nil }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user