diff options
author | Philip Arndt <parndt@gmail.com> | 2011-02-21 13:16:42 +1300 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2011-02-21 13:21:56 +1300 |
commit | f221da62cde073059424eddaa1f7a52ed67de848 (patch) | |
tree | 563d1dcb3abd2230a453609665965ef33348a06f /spec/models | |
parent | 4228fa4146360751edb1241e187f67d03128cdaf (diff) | |
download | refinerycms-blog-f221da62cde073059424eddaa1f7a52ed67de848.tar.gz refinerycms-blog-f221da62cde073059424eddaa1f7a52ed67de848.tar.bz2 refinerycms-blog-f221da62cde073059424eddaa1f7a52ed67de848.zip |
Added settings click-button functionality for toggling comments being enabled, with translations.
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/blog_posts_spec.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/spec/models/blog_posts_spec.rb b/spec/models/blog_posts_spec.rb index f15cd64..9a58e3f 100644 --- a/spec/models/blog_posts_spec.rb +++ b/spec/models/blog_posts_spec.rb @@ -94,14 +94,14 @@ describe BlogPost do BlogPost.previous(blog_post2).should == [blog_post1] end end - + describe "uncategorized scope" do it "returns uncategorized posts if they exist" do uncategorized_blog_post = Factory(:post) categorized_blog_post = Factory(:post) - + categorized_blog_post.categories << Factory(:blog_category) - + BlogPost.uncategorized.should include uncategorized_blog_post BlogPost.uncategorized.should_not include categorized_blog_post end @@ -162,10 +162,9 @@ describe BlogPost do BlogPost.comments_allowed?.should be_true end - # TODO: fix this test - # it "returns false if comments_allowed setting is set to false" do - # RefinerySetting.set(:comments_allowed, false) - # BlogPost.comments_allowed?.should be_false - # end + it "returns false if comments_allowed setting is set to false" do + RefinerySetting.set(:comments_allowed, {:scoping => 'blog', :value => false}) + BlogPost.comments_allowed?.should be_false + end end end |