Skip to content

Commit

Permalink
Updated simple forms flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
RachalCassity committed Apr 26, 2024
1 parent 8130543 commit 3539206
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions modules/simple_forms_api/spec/services/pdf_filler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@

describe '#generate' do
forms.each do |file_name|
context "when mapping the pdf data given JSON file: #{file_name}" do
let(:expected_pdf_path) { map_pdf_data(file_name) }
ActiveRecord::Base.transaction do
context "when mapping the pdf data given JSON file: #{file_name}" do
let(:expected_pdf_path) { map_pdf_data(file_name) }

# remove the pdf if it already exists
after { FileUtils.rm_f(expected_pdf_path) }
# remove the pdf if it already exists
after { FileUtils.rm_f(expected_pdf_path) }

context 'when a legitimate JSON payload is provided' do
it 'properly fills out the associated PDF' do
expect(File.exist?(expected_pdf_path)).to eq(true)
context 'when a legitimate JSON payload is provided' do
it 'properly fills out the associated PDF' do
expect(File.exist?(expected_pdf_path)).to eq(true)
end
end
end
end
Expand Down

0 comments on commit 3539206

Please sign in to comment.