Upstream sync

This commit is contained in:
Senad Uka
2020-09-16 05:39:08 +02:00
parent 5cf7be6f13
commit 28e0eb36b7
61 changed files with 419 additions and 268 deletions

View File

@@ -205,34 +205,6 @@ RSpec.feature 'User manages contract templates', type: :feature do
expect(pdf_body).to have_content('Guardian')
end
context 'preventing creation of release template with wrong fee value' do
before do
visit new_project_contract_template_path(project)
fill_in 'Name', with: 'My Release Template'
select 'Appearance Release', from: 'Release type'
fill_in_trix body_field, with: 'You agree to this release.'
fill_hidden guardian_clause_field, with: 'Your minor agrees to this release.'
select 'All', from: 'Applicable Media'
select 'Other', from: 'Territory'
fill_in 'Describe other territory', with: 'North America only'
select 'In perpetuity', from: 'Term'
select 'None', from: 'Restriction'
end
scenario 'Should not allow negative fees' do
fill_in 'Fee', with: '-200'
click_on create_release_template_button
expect(page).not_to have_content(create_contract_template_success_message)
end
scenario 'Should not allow fees with more than 9 digits' do
fill_in 'Fee', with: '9999999999'
click_on create_release_template_button
expect(page).not_to have_content(create_contract_template_success_message)
end
end
scenario 'contract template preview is shown before printing' do
create(:appearance_release_contract_template, body: 'Contract legal language', project: project)
visit project_contract_templates_path(project)