diff options
Diffstat (limited to 'spec/models/public_body_spec.rb')
-rw-r--r-- | spec/models/public_body_spec.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/models/public_body_spec.rb b/spec/models/public_body_spec.rb index 38e31783d..a7544c218 100644 --- a/spec/models/public_body_spec.rb +++ b/spec/models/public_body_spec.rb @@ -493,7 +493,7 @@ describe PublicBody, " when loading CSV files" do PublicBody.count.should == original_count + 3 - # XXX Not sure why trying to do a I18n.with_locale fails here. Seems related to + # TODO: Not sure why trying to do a I18n.with_locale fails here. Seems related to # the way categories are loaded every time from the PublicBody class. For now we just # test some translation was done. body = PublicBody.find_by_name('North West Fake Authority') @@ -594,6 +594,20 @@ describe PublicBody do end + describe :site_administration? do + + it 'is true when the body has the site_administration tag' do + p = FactoryGirl.build(:public_body, :tag_string => 'site_administration') + p.site_administration?.should be_true + end + + it 'is false when the body does not have the site_administration tag' do + p = FactoryGirl.build(:public_body) + p.site_administration?.should be_false + end + + end + end describe PublicBody, " when override all public body request emails set" do |