add completed submitters and documents

This commit is contained in:
Oleksandr Turchyn
2024-10-22 22:29:24 +03:00
committed by Pete Matsyburka
parent c303159c63
commit e2f930f6f7
14 changed files with 302 additions and 18 deletions
+4 -11
View File
@@ -6,6 +6,10 @@ RSpec.describe 'Submit Form' do
let!(:account) { create(:account) }
let!(:user) { create(:user, account:) }
let!(:template) { create(:template, account:, author: user) }
let!(:encrypted_config) do
create(:encrypted_config, key: EncryptedConfig::ESIGN_CERTS_KEY,
value: GenerateCertificate.call.transform_values(&:to_pem))
end
before do
sign_in(user)
@@ -72,16 +76,5 @@ RSpec.describe 'Submit Form' do
expect(submitter.completed_at).to be_present
expect(submitter.values.values).to include('Sally')
end
it 'sends completed email' do
fill_in 'First Name', with: 'Adam'
click_on 'next'
click_on 'type_text_button'
fill_in 'signature_text_input', with: 'Adam'
expect do
click_on 'Sign and Complete'
end.to change(ProcessSubmitterCompletionJob.jobs, :size).by(1)
end
end
end