Sha256: 08e5c23991f4672ba8989d3e44f37acc55d3617f55b940e15f2f6019a7da61ca
Contents?: true
Size: 809 Bytes
Versions: 14
Compression:
Stored size: 809 Bytes
Contents
require File.dirname(__FILE__) + "/../spec_helper" describe 'Forum-extended page' do dataset :forums before do login_as_reader(:normal) 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.commentable_period.should == 28.days page.locked?.should be_false page.created_at = Time.now - 30.days page.locked?.should be_true end end
Version data entries
14 entries across 14 versions & 1 rubygems