From d29fd88e3c54a5a5a94b29d16cb46dd859b59e05 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Mon, 15 Mar 2010 13:27:16 +0000 Subject: Do not binary mask the pdf if pdftk silently fails producing no output --- spec/models/incoming_message_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec/models') diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb index 0cfdeac3a..35e9b3a2b 100644 --- a/spec/models/incoming_message_spec.rb +++ b/spec/models/incoming_message_spec.rb @@ -174,6 +174,13 @@ describe IncomingMessage, " when censoring data" do masked_text.should match(/xxx@xxx.xxx.xx/) end + it "should not produce zero length output if pdftk silently fails" do + orig_pdf = load_file_fixture('psni.pdf') + pdf = orig_pdf.dup + @im.binary_mask_stuff!(pdf, "application/pdf") + pdf.should_not == "" + end + it "should apply censor rules to HTML files" do data = @test_data.dup @im.html_mask_stuff!(data) -- cgit v1.2.3