Skip to content

Commit 3703471

Browse files
committed
fix distribution PDFs comparison test
1 parent 04c8d79 commit 3703471

File tree

6 files changed

+6
-1
lines changed

6 files changed

+6
-1
lines changed
-3.75 KB
Binary file not shown.
-3.67 KB
Binary file not shown.
-3.75 KB
Binary file not shown.
-3.76 KB
Binary file not shown.
-3.76 KB
Binary file not shown.

spec/pdfs/distribution_pdf_spec.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def compare_pdf(distribution, expected_file_path)
137137
begin
138138
# Run the following from Rails sandbox console (bin/rails/console --sandbox) to regenerate these comparison PDFs:
139139
# => load "lib/test_helpers/pdf_comparison_test_factory.rb"
140-
# => Rails::ConsoleMethods.send(:prepend, PDFComparisonTestFactory)
140+
# => Flipper.enable(:enable_packs)
141141
# => PDFComparisonTestFactory.create_comparison_pdfs
142142
expect(pdf_file).to eq(IO.binread(expected_file_path))
143143
rescue RSpec::Expectations::ExpectationNotMetError => e
@@ -146,6 +146,11 @@ def compare_pdf(distribution, expected_file_path)
146146
end
147147
end
148148

149+
# The generated PDFs (PDFs to use for comparison) are expecting the packs feature to be enabled.
150+
before(:each) do
151+
Flipper.enable(:enable_packs)
152+
end
153+
149154
let(:partner) { PDFComparisonTestFactory.create_partner(organization) }
150155
let(:file_paths) { PDFComparisonTestFactory.get_file_paths }
151156
let(:expected_different_address_file_path) { file_paths.expected_different_address_file_path }

0 commit comments

Comments
 (0)