Taskme update
This commit is contained in:
@@ -11,7 +11,12 @@ FactoryBot.define do
|
||||
end
|
||||
|
||||
trait :native do
|
||||
person_address "100 Test Lane, New York, NY 10001"
|
||||
person_address_street1 "St1"
|
||||
person_address_street2 "St2"
|
||||
person_address_city "City"
|
||||
person_address_state "State"
|
||||
person_address_zip "ZIP"
|
||||
person_address_country "Country"
|
||||
person_phone "123-555-6789"
|
||||
|
||||
signature do
|
||||
@@ -31,16 +36,28 @@ FactoryBot.define do
|
||||
minor true
|
||||
guardian_first_name "Jamie"
|
||||
guardian_last_name "Doe"
|
||||
guardian_address "100 Test Lane, New York, 10001"
|
||||
guardian_address_street1 "St1"
|
||||
guardian_address_street2 "St2"
|
||||
guardian_address_city "City"
|
||||
guardian_address_state "State"
|
||||
guardian_address_zip "ZIP"
|
||||
guardian_address_country "Country"
|
||||
guardian_phone "123-555-1234"
|
||||
guardian_email "guardian@galaxy.all"
|
||||
end
|
||||
|
||||
trait :minor_with_guardian_photo do
|
||||
minor true
|
||||
guardian_first_name "Jamie"
|
||||
guardian_last_name "Doe"
|
||||
guardian_address "100 Test Lane, New York, 10001"
|
||||
guardian_phone "123-555-1234"
|
||||
guardian_email "guardian@galaxy.all"
|
||||
guardian_address_street1 "St1"
|
||||
guardian_address_street2 "St2"
|
||||
guardian_address_city "City"
|
||||
guardian_address_state "State"
|
||||
guardian_address_zip "ZIP"
|
||||
guardian_address_country "Country"
|
||||
guardian_photo do
|
||||
path = Rails.root.join("spec", "fixtures", "files", "pratt.jpg")
|
||||
Rack::Test::UploadedFile.new(path, "image/jpeg")
|
||||
@@ -65,5 +82,24 @@ FactoryBot.define do
|
||||
appearance_release.contract_template = build(:appearance_release_contract_template)
|
||||
end
|
||||
end
|
||||
|
||||
factory :appearance_release_import do
|
||||
person_photo nil
|
||||
|
||||
trait :with_headshot do
|
||||
person_photo do
|
||||
path = Rails.root.join("spec", "fixtures", "files", "person_photo.png")
|
||||
Rack::Test::UploadedFile.new(path, "image/png")
|
||||
end
|
||||
end
|
||||
|
||||
trait :with_contract do
|
||||
contract do
|
||||
path = Rails.root.join("spec", "fixtures", "files", "AppearanceRelease.pdf")
|
||||
Rack::Test::UploadedFile.new(path, "application/pdf")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,6 +8,10 @@ FactoryBot.define do
|
||||
guardian_clause "Is the signer a minor?"
|
||||
fee "$0.00"
|
||||
|
||||
trait :archived do
|
||||
archived_at Time.zone.now
|
||||
end
|
||||
|
||||
factory :appearance_release_contract_template do
|
||||
release_type "appearance"
|
||||
end
|
||||
@@ -16,10 +20,18 @@ FactoryBot.define do
|
||||
release_type "talent"
|
||||
end
|
||||
|
||||
factory :medical_release_contract_template do
|
||||
release_type "medical"
|
||||
end
|
||||
|
||||
factory :material_release_contract_template do
|
||||
release_type "material"
|
||||
end
|
||||
|
||||
factory :misc_release_contract_template do
|
||||
release_type "misc"
|
||||
end
|
||||
|
||||
factory :location_release_contract_template do
|
||||
release_type "location"
|
||||
end
|
||||
|
||||
@@ -15,6 +15,13 @@ FactoryBot.define do
|
||||
end
|
||||
end
|
||||
|
||||
trait :with_photo do
|
||||
photos do
|
||||
path = Rails.root.join("spec", "fixtures", "files", "location_photo.png")
|
||||
[Rack::Test::UploadedFile.new(path, "image/png")]
|
||||
end
|
||||
end
|
||||
|
||||
trait :non_native do
|
||||
contract do
|
||||
path = Rails.root.join("spec", "fixtures", "files", "contract.pdf")
|
||||
|
||||
@@ -15,6 +15,14 @@ FactoryBot.define do
|
||||
end
|
||||
end
|
||||
|
||||
trait :with_photo do
|
||||
photos do
|
||||
path = Rails.root.join("spec", "fixtures", "files", "material_photo.png")
|
||||
[Rack::Test::UploadedFile.new(path, "image/png")]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
trait :non_native do
|
||||
contract do
|
||||
path = Rails.root.join("spec", "fixtures", "files", "contract.pdf")
|
||||
|
||||
47
spec/factories/medical_releases.rb
Normal file
47
spec/factories/medical_releases.rb
Normal file
@@ -0,0 +1,47 @@
|
||||
FactoryBot.define do
|
||||
factory :medical_release do
|
||||
association :project
|
||||
|
||||
person_first_name "Jane"
|
||||
person_last_name "Doe"
|
||||
|
||||
photos [Rack::Test::UploadedFile.new(Rails.root.join("spec", "fixtures", "files", "person_photo.png"), "image/png")]
|
||||
|
||||
trait :native do
|
||||
person_phone "123-555-6789"
|
||||
|
||||
signature do
|
||||
path = Rails.root.join("spec", "fixtures", "files", "signature.png")
|
||||
Rack::Test::UploadedFile.new(path, "image/png")
|
||||
end
|
||||
end
|
||||
|
||||
trait :non_native do
|
||||
contract do
|
||||
path = Rails.root.join("spec", "fixtures", "files", "contract.pdf")
|
||||
Rack::Test::UploadedFile.new(path, "application/pdf")
|
||||
end
|
||||
end
|
||||
|
||||
factory :medical_release_with_contract_template do
|
||||
after(:build) do |medical_release, _|
|
||||
medical_release.contract_template = build(:medical_release_contract_template)
|
||||
end
|
||||
end
|
||||
|
||||
factory :medical_release_with_contract_template_and_photos do
|
||||
after(:build) do |medical_release, _|
|
||||
medical_release.contract_template = build(:medical_release_contract_template)
|
||||
path = Rails.root.join("spec", "fixtures", "files", "person_photo.png")
|
||||
medical_release.photos.attach Rack::Test::UploadedFile.new(path, "image/png")
|
||||
end
|
||||
end
|
||||
|
||||
factory :medical_release_with_photo do
|
||||
after(:build) do |medical_release, _|
|
||||
path = Rails.root.join("spec", "fixtures", "files", "person_photo.png")
|
||||
medical_release.photos.attach Rack::Test::UploadedFile.new(path, "image/png")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
58
spec/factories/misc_releases.rb
Normal file
58
spec/factories/misc_releases.rb
Normal file
@@ -0,0 +1,58 @@
|
||||
FactoryBot.define do
|
||||
factory :misc_release do
|
||||
association :project
|
||||
|
||||
person_first_name "Jane"
|
||||
person_last_name "Doe"
|
||||
|
||||
photos [Rack::Test::UploadedFile.new(Rails.root.join("spec", "fixtures", "files", "person_photo.png"), "image/png")]
|
||||
|
||||
trait :native do
|
||||
person_phone "123-555-6789"
|
||||
|
||||
signature do
|
||||
path = Rails.root.join("spec", "fixtures", "files", "signature.png")
|
||||
Rack::Test::UploadedFile.new(path, "image/png")
|
||||
end
|
||||
end
|
||||
|
||||
trait :minor do
|
||||
minor true
|
||||
guardian_first_name "Jamie"
|
||||
guardian_last_name "Doe"
|
||||
guardian_phone "123-555-1234"
|
||||
end
|
||||
|
||||
trait :minor_with_guardian_photo do
|
||||
minor true
|
||||
guardian_first_name "Jamie"
|
||||
guardian_last_name "Doe"
|
||||
guardian_phone "123-555-1234"
|
||||
guardian_photo do
|
||||
path = Rails.root.join("spec", "fixtures", "files", "pratt.jpg")
|
||||
Rack::Test::UploadedFile.new(path, "image/jpeg")
|
||||
end
|
||||
end
|
||||
|
||||
factory :misc_release_with_contract_template do
|
||||
after(:build) do |misc_release, _|
|
||||
misc_release.contract_template = build(:misc_release_contract_template)
|
||||
end
|
||||
end
|
||||
|
||||
factory :misc_release_with_contract_template_and_photos do
|
||||
after(:build) do |misc_release, _|
|
||||
misc_release.contract_template = build(:misc_release_contract_template)
|
||||
path = Rails.root.join("spec", "fixtures", "files", "person_photo.png")
|
||||
misc_release.photos.attach Rack::Test::UploadedFile.new(path, "image/png")
|
||||
end
|
||||
end
|
||||
|
||||
factory :misc_release_with_photo do
|
||||
after(:build) do |misc_release, _|
|
||||
path = Rails.root.join("spec", "fixtures", "files", "person_photo.png")
|
||||
misc_release.photos.attach Rack::Test::UploadedFile.new(path, "image/png")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -16,6 +16,7 @@ FactoryBot.define do
|
||||
appearance_release: true,
|
||||
location_release: true,
|
||||
material_release: true,
|
||||
medical_release: true,
|
||||
music_release: true,
|
||||
talent_release: true,
|
||||
video_analysis: true,
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
FactoryBot.define do
|
||||
factory :zoom_user do
|
||||
account_number ZoomGateway.ACCOUNT_NUMBER
|
||||
trait ZoomGateway.USER_TYPE_NAME
|
||||
|
||||
trait :with_api_id do
|
||||
api_id "api_user_id"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user