Sha256: f3ac6ec027ffa1b4890d734bd7362f7c94c4a53d1e3a0047541de7473ab144d5
Contents?: true
Size: 1.05 KB
Versions: 6
Compression:
Stored size: 1.05 KB
Contents
require File.dirname(__FILE__) + "/../spec_helper" if defined? Site Radiant::Config['reader.layout'] = 'This one' describe 'Forum site' do dataset :forum_layouts, :forum_sites it "should have a forums association" do Site.reflect_on_association(:forums).should_not be_nil end it "should have a topics association" do Site.reflect_on_association(:topics).should_not be_nil end it "should have a posts association" do Site.reflect_on_association(:posts).should_not be_nil end it "should have a forum_layout association" do Site.reflect_on_association(:forum_layout).should_not be_nil end it "should return reader layout by default" do site = sites(:test) site.reader_layout = layouts(:reader) site.layout_for(:forum).should == 'Reader' end it "should return forum layout name if specified" do site = sites(:test) site.reader_layout = layouts(:reader) site.forum_layout = layouts(:forum) site.layout_for(:forum).should == 'Forum' end end end
Version data entries
6 entries across 6 versions & 1 rubygems