fix specs related to location release
This commit is contained in:
@@ -150,9 +150,49 @@ describe "IOS App Support API" do
|
||||
expect(response.body).to match /Person/
|
||||
end
|
||||
|
||||
it 'creates location release' do
|
||||
release = releases.third
|
||||
release_json = { "data" => {
|
||||
"type" => "location_release",
|
||||
"attributes" => {
|
||||
"name" => "Test Premises",
|
||||
"address_street1" => "Dummy St.",
|
||||
"address_city" => "Dummy City",
|
||||
"address_state" => "Dummy State",
|
||||
"address_zip" => "12121",
|
||||
"address_country" => "US",
|
||||
"person_first_name" => "John",
|
||||
"person_last_name" => "Doe",
|
||||
"person_phone" => "222223333",
|
||||
"person_email" => "mail@mail.com",
|
||||
"person_company" => "Dummy Company Inc.",
|
||||
"person_title" => "mr.",
|
||||
"person_address_street1" => "Dummy St. 2",
|
||||
"person_address_city" => "Dummy City 2",
|
||||
"person_address_state" => "Dummy State 2",
|
||||
"person_address_zip" => "1111111",
|
||||
"person_address_country" => "US",
|
||||
"filming_ended_on" => DateTime.now,
|
||||
"filming_started_on" => "01/02/20",
|
||||
"filming_hours" => "04-20",
|
||||
"signature" => "#{signature_base64}"
|
||||
}
|
||||
} }.to_json
|
||||
|
||||
post "/api/v1/contract_templates/#{template.id}/#{release[:type].to_s.pluralize}", params: release_json, headers: required_headers(current_user)
|
||||
|
||||
json = JSON.parse(response.body)
|
||||
|
||||
expect(response.status).to eq 201
|
||||
expect(json["data"]["attributes"].keys.length).to be > 1
|
||||
expect(response.body).to match /John/
|
||||
expect(response.body).to match /Doe/
|
||||
end
|
||||
|
||||
it 'creates talent, material and location releases' do
|
||||
releases.each do |release|
|
||||
next if release[:type] == :appearance_release
|
||||
next if release[:type] == :location_release
|
||||
|
||||
release_json = { "data" => {
|
||||
"type" => release[:type].to_s,
|
||||
|
||||
Reference in New Issue
Block a user