aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spec/models/foi_attachment_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/foi_attachment_spec.rb b/spec/models/foi_attachment_spec.rb
index 5b5db3dbf..9583f4c76 100644
--- a/spec/models/foi_attachment_spec.rb
+++ b/spec/models/foi_attachment_spec.rb
@@ -61,4 +61,16 @@ describe FoiAttachment do
end
+ describe :has_body_as_html? do
+
+ it 'should be true for a pdf attachment' do
+ FactoryGirl.build(:pdf_attachment).has_body_as_html?.should be_true
+ end
+
+ it 'should be false for an html attachment' do
+ FactoryGirl.build(:html_attachment).has_body_as_html?.should be_false
+ end
+
+ end
+
end