Sha256: ea60c054604730205d6bbb0395831f9b8d163cf226c4a7672f443425fbde91cd
Contents?: true
Size: 817 Bytes
Versions: 10
Compression:
Stored size: 817 Bytes
Contents
FactoryGirl.define do factory :article do ignore do user {FactoryGirl.create(:user)} end sequence(:title) {|n| "Title #{n}"} sequence(:abstract) {|n| "Abstract #{n}"} rights { Sufia.config.cc_licenses.keys.first.dup } date_uploaded { Date.today } date_modified { Date.today } visibility Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED before(:create) { |work, evaluator| work.apply_depositor_metadata(evaluator.user.user_key) work.contributors << FactoryGirl.create(:person) } factory :private_article do visibility Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE end factory :public_article do visibility Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC end end end
Version data entries
10 entries across 10 versions & 1 rubygems