Replace ignore with transient according to changes in factory bot v5

This commit is contained in:
Luis Ramos
2020-12-10 22:14:40 +00:00
parent 9728b088f9
commit bcf7cc1013
2 changed files with 4 additions and 4 deletions

View File

@@ -22,8 +22,8 @@ FactoryBot.define do
bill_address
ship_address
ignore do
line_items_count 5
transient do
line_items_count { 5 }
end
after(:create) do |order, evaluator|

View File

@@ -2,10 +2,10 @@
FactoryBot.define do
factory :stock_package, class: OrderManagement::Stock::Package do
ignore do
transient do
stock_location { build(:stock_location) }
order { create(:order_with_line_items, line_items_count: 2) }
contents []
contents { [] }
end
initialize_with { new(stock_location, order, contents) }