going for the positive, instead of the double negative (listed not unlisted)

This commit is contained in:
Dirk Kelly 2011-02-01 16:07:18 +08:00
parent d672c0b946
commit b627b9bcb9
2 changed files with 9 additions and 7 deletions

View File

@ -9,7 +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 include Models::Extensions::Page::Listed
## fields ## ## fields ##
field :title field :title

View File

@ -206,14 +206,16 @@ describe Page do
end end
describe 'unlisted extension' do describe 'listed extension' do
before(:each) do it 'is considered as a visible page' do
@page = Factory.build(:page, :site => nil, :unlisted => true, :content_type_id => 42) @page = Factory.build(:page, :site => nil, :content_type_id => 42)
@page.listed?.should be_true
end end
it 'is considered as a unlisted page' do it 'is not considered as a visible page' do
@page.unlisted?.should be_true @page = Factory.build(:page, :site => nil, :listed => false, :content_type_id => 42)
@page.listed?.should be_false
end end
end end