going for the positive, instead of the double negative (listed not unlisted)
This commit is contained in:
parent
d672c0b946
commit
b627b9bcb9
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user