-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
39 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
FactoryGirl.define do | ||
factory :collection do | ||
transient do | ||
user { FactoryGirl.create(:user) } | ||
end | ||
sequence(:title) { |n| ["Title #{n}"] } | ||
transient do | ||
user { FactoryGirl.create(:user) } | ||
end | ||
sequence(:title) { |n| ["Title #{n}"] } | ||
|
||
after(:build) do |work, evaluator| | ||
work.apply_depositor_metadata(evaluator.user.user_key) | ||
end | ||
after(:build) do |work, evaluator| | ||
work.apply_depositor_metadata(evaluator.user.user_key) | ||
end | ||
|
||
factory :public_collection, traits: [:public] | ||
factory :public_collection, traits: [:public] | ||
|
||
trait :public do | ||
visibility Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC | ||
end | ||
trait :public do | ||
visibility Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC | ||
end | ||
|
||
factory :private_collection do | ||
visibility Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE | ||
end | ||
factory :private_collection do | ||
visibility Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE | ||
end | ||
|
||
factory :institution_collection do | ||
visibility Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED | ||
end | ||
factory :institution_collection do | ||
visibility Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED | ||
end | ||
|
||
factory :named_collection do | ||
title ['collection title'] | ||
description ['collection description'] | ||
end | ||
factory :named_collection do | ||
title ['collection title'] | ||
description ['collection description'] | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,5 @@ | |
title ["Fake Wav File.wav"] | ||
subject %w[sed do eiusmod tempor incididunt ut labore] | ||
end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# spec/support/factory_girl.rb | ||
RSpec.configure do |config| | ||
config.include FactoryGirl::Syntax::Methods | ||
end | ||
end |