diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-05-22 13:08:50 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-05-22 13:09:11 +0100 |
commit | f3348c5e5df839e11265b4d1f7e0f2bdae7f6703 (patch) | |
tree | fd34619ae1f66db0d589e77d5b29d4d2270704de | |
parent | 5589b75b247cce161ba71f1e62c0a3bd4f98e932 (diff) |
Add specs for :has_body_as_html?
Cleaned up by @jpmckinney in 4329ffa27cf83c00e03a0b0600ee54ce06056ee3,
so adding a couple of regression specs.
-rw-r--r-- | spec/models/foi_attachment_spec.rb | 12 |
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 |