Initial commit
This commit is contained in:
24
spec/factories/downloads.rb
Normal file
24
spec/factories/downloads.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
FactoryBot.define do
|
||||
factory :download do
|
||||
association :project
|
||||
|
||||
release_type "AppearanceRelease"
|
||||
|
||||
trait :with_file do
|
||||
file do
|
||||
path = Rails.root.join("spec", "fixtures", "files", "contract.pdf")
|
||||
Rack::Test::UploadedFile.new(path, "application/pdf")
|
||||
end
|
||||
end
|
||||
|
||||
factory :download_release_type_appearance do
|
||||
name "Natgeo Contract"
|
||||
release_type "AppearanceRelease"
|
||||
end
|
||||
|
||||
factory :download_release_type_music do
|
||||
name "Discovery Contract"
|
||||
release_type "MusicRelease"
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user