Sha256: 92f139a7e16adc8e8a5e4ef26f23644f87ffa2d047fa3f9fa1df7a37ecfb960f
Contents?: true
Size: 1.19 KB
Versions: 4
Compression:
Stored size: 1.19 KB
Contents
require File.dirname(__FILE__) + "/../spec_helper" describe 'Forum-extended page' do dataset :forums before do login_as_reader(:normal) end describe "when pages are commentable" do before do Radiant::Config['forum.allow_page_comments?'] = true end it "should normally be commentable" do pages(:uncommented).locked?.should be_false end it "should be locked if marked not commentable" do pages(:uncommentable).locked?.should be_true end it "should be locked if marked comments_closed" do pages(:comments_closed).locked?.should be_true end it "should be locked if there is a commentable period and it has expired" do Radiant::Config['forum.commentable_period'] = 28 page = pages(:commentable) page.send(:commentable_period).should == 28.days page.locked?.should be_false page.created_at = Time.now - 30.days page.locked?.should be_true end end describe "when pages are not commentable" do before do Radiant::Config['forum.allow_page_comments?'] = false end it "should not be commentable" do pages(:uncommented).locked?.should be_true end end end
Version data entries
4 entries across 4 versions & 1 rubygems