spec/factories/file_sets.rb in hyrax-2.0.3 vs spec/factories/file_sets.rb in hyrax-2.1.0.beta1
- old
+ new
@@ -1,9 +1,9 @@
FactoryBot.define do
factory :file_set do
transient do
- user { FactoryBot.create(:user) }
+ user { create(:user) }
content nil
end
after(:build) do |fs, evaluator|
fs.apply_depositor_metadata evaluator.user.user_key
end
@@ -28,10 +28,10 @@
end
after(:create) do |file, evaluator|
if evaluator.content
Hydra::Works::UploadFileToFileSet.call(file, evaluator.content)
end
- FactoryBot.create(:generic_work, user: evaluator.user).members << file
+ create(:work, user: evaluator.user).members << file
end
end
end
end