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

Version Path
radiant-forum-extension-2.1.4 spec/lib/forum_page_spec.rb
radiant-forum-extension-2.1.3 spec/lib/forum_page_spec.rb
radiant-forum-extension-2.1.2 spec/lib/forum_page_spec.rb
radiant-forum-extension-2.1.1 spec/lib/forum_page_spec.rb
radiant-forum-extension-2.0.9 spec/lib/forum_page_spec.rb
radiant-forum-extension-2.0.8 spec/lib/forum_page_spec.rb
radiant-forum-extension-2.0.7 spec/lib/forum_page_spec.rb
radiant-forum-extension-2.0.6 spec/lib/forum_page_spec.rb
radiant-forum-extension-2.0.5 spec/lib/forum_page_spec.rb
radiant-forum-extension-2.0.4 spec/lib/forum_page_spec.rb
radiant-forum-extension-2.0.3 spec/lib/forum_page_spec.rb
radiant-forum-extension-2.0.2 spec/lib/forum_page_spec.rb
radiant-forum-extension-2.0.1 spec/lib/forum_page_spec.rb
radiant-forum-extension-2.0.0 spec/lib/forum_page_spec.rb