aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib/attachment_to_html
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-06-06 13:55:11 +0100
committerLouise Crow <louise.crow@gmail.com>2014-06-06 13:55:11 +0100
commit4b77176613a1235cc9f4f813bb5610c9930e3d2e (patch)
treed88b084ad348a9c3c95b1b78328125e3e4113c91 /spec/lib/attachment_to_html
parent841fe0722498f6ec5b97ce22f8c7a429a1497843 (diff)
parent895fffedf54ae9ea4168cf03ca5aa55f93a93b49 (diff)
Merge remote-tracking branch 'origin/hotfix/0.18.0.3'0.18.0.3
Diffstat (limited to 'spec/lib/attachment_to_html')
-rw-r--r--spec/lib/attachment_to_html/adapters/rtf_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/attachment_to_html/adapters/rtf_spec.rb b/spec/lib/attachment_to_html/adapters/rtf_spec.rb
index a3bf0e27e..2c53b5272 100644
--- a/spec/lib/attachment_to_html/adapters/rtf_spec.rb
+++ b/spec/lib/attachment_to_html/adapters/rtf_spec.rb
@@ -60,6 +60,17 @@ describe AttachmentToHTML::Adapters::RTF do
adapter.body.should_not include('//W3C//DTD HTML 4.01 Transitional//EN')
end
+ it 'converts empty files' do
+ attachment = FactoryGirl.build(:rtf_attachment, :body => load_file_fixture('empty.rtf'))
+ adapter = AttachmentToHTML::Adapters::RTF.new(attachment)
+ adapter.body.should == ''
+ end
+
+ it 'doesnt fail if the external command returns nil' do
+ AlaveteliExternalCommand.stub(:run).and_return(nil)
+ adapter.body.should == ''
+ end
+
end