spec/factories/item.rb in enju_circulation-0.3.6 vs spec/factories/item.rb in enju_circulation-0.3.7
- old
+ new
@@ -1,12 +1,12 @@
FactoryBot.define do
factory :item do
sequence(:item_identifier){|n| "item_#{n}"}
circulation_status_id{CirculationStatus.find(1).id}
manifestation_id{FactoryBot.create(:manifestation).id}
- bookstore { Bookstore.first }
- budget_type { BudgetType.first }
- after(:create) do |item|
+ after(:build) do |item|
+ bookstore = Bookstore.find(1)
+ budget_type = BudgetType.find(1)
item.use_restriction = UseRestriction.find_by(name: 'Limited Circulation, Normal Loan Period')
end
end
end