Fix syntax for nil properties

This commit is contained in:
Luis Ramos
2020-12-09 23:38:16 +00:00
parent c17998774e
commit 9728b088f9
6 changed files with 8 additions and 8 deletions

View File

@@ -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

View File

@@ -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|

View File

@@ -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

View File

@@ -8,7 +8,7 @@ FactoryBot.define do
user
bill_address
completed_at nil
completed_at { nil }
email { user.email }
factory :order_with_totals do

View File

@@ -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) }

View File

@@ -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