diff --git a/app/models/page.rb b/app/models/page.rb index 950b055c..42b15096 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -9,7 +9,7 @@ class Page include Models::Extensions::Page::Render include Models::Extensions::Page::Templatized include Models::Extensions::Page::Redirect - include Models::Extensions::Page::Unlisted + include Models::Extensions::Page::Listed ## fields ## field :title diff --git a/spec/models/page_spec.rb b/spec/models/page_spec.rb index 22bfaa6d..d2e06030 100644 --- a/spec/models/page_spec.rb +++ b/spec/models/page_spec.rb @@ -206,14 +206,16 @@ describe Page do end - describe 'unlisted extension' do + describe 'listed extension' do - before(:each) do - @page = Factory.build(:page, :site => nil, :unlisted => true, :content_type_id => 42) + it 'is considered as a visible page' do + @page = Factory.build(:page, :site => nil, :content_type_id => 42) + @page.listed?.should be_true end - - it 'is considered as a unlisted page' do - @page.unlisted?.should be_true + + it 'is not considered as a visible page' do + @page = Factory.build(:page, :site => nil, :listed => false, :content_type_id => 42) + @page.listed?.should be_false end end