Added an unlisted flag

This commit is contained in:
Dirk Kelly 2011-02-01 14:39:20 +08:00
parent 7d529f22d7
commit 6ba65b1b96
2 changed files with 13 additions and 0 deletions

View File

@ -9,6 +9,7 @@ class Page
include Models::Extensions::Page::Render include Models::Extensions::Page::Render
include Models::Extensions::Page::Templatized include Models::Extensions::Page::Templatized
include Models::Extensions::Page::Redirect include Models::Extensions::Page::Redirect
include Models::Extensions::Page::Unlisted
## fields ## ## fields ##
field :title field :title

View File

@ -205,6 +205,18 @@ describe Page do
end end
end end
describe 'unlisted extension' do
before(:each) do
@page = Factory.build(:page, :site => nil, :unlisted => true, :content_type_id => 42)
end
it 'is considered as a unlisted page' do
@page.unlisted?.should be_true
end
end
describe 'redirect extension' do describe 'redirect extension' do