Sha256: d531740a23932665deab4771b6e0b0c9ac93486400f1d3e5d71fcd9969ea76c1
Contents?: true
Size: 911 Bytes
Versions: 64
Compression:
Stored size: 911 Bytes
Contents
FactoryGirl.define do # The ::FileSet model is defined in .internal_test_app/app/models by the # curation_concerns:install generator. factory :file_set, class: FileSet do transient do user { FactoryGirl.create(:user) } content nil end after(:create) do |file, evaluator| if evaluator.content Hydra::Works::UploadFileToFileSet.call(file, evaluator.content) end end factory :file_with_work do after(:build) do |file, _evaluator| file.title = ['testfile'] end after(:create) do |file, evaluator| if evaluator.content Hydra::Works::UploadFileToFileSet.call(file, evaluator.content) end FactoryGirl.create(:generic_work, user: evaluator.user).members << file end end after(:build) do |file, evaluator| file.apply_depositor_metadata(evaluator.user.user_key) end end end
Version data entries
64 entries across 64 versions & 1 rubygems