aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/models/blog_post_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/models/blog_post_spec.rb b/spec/models/blog_post_spec.rb
index 5642446..1d29094 100644
--- a/spec/models/blog_post_spec.rb
+++ b/spec/models/blog_post_spec.rb
@@ -190,4 +190,28 @@ describe BlogPost do
Factory.create(:blog_post, :custom_teaser => 'This is some custom content').should be_valid
end
end
+
+ describe ".teasers_enabled?" do
+ context "with RefinerySetting teasers_enabled set to true" do
+ before do
+ RefinerySetting.set(:teasers_enabled, { :scoping => 'blog', :value => true })
+ end
+
+ it "should be true" do
+ BlogPost.teasers_enabled?.should be_true
+ end
+ end
+
+ context "with RefinerySetting teasers_enabled set to false" do
+ before do
+ RefinerySetting.set(:teasers_enabled, { :scoping => 'blog', :value => false })
+ end
+
+ it "should be false" do
+ BlogPost.teasers_enabled?.should be_false
+ end
+ end
+
+ end
+
end