fix broken tests

This commit is contained in:
did 2011-03-05 01:51:44 +01:00
parent 537c1a6f67
commit 7d5018eedc
3 changed files with 10 additions and 6 deletions

View File

@ -2,13 +2,13 @@ BOARD:
x pull requests #31 et #32
x password / new_password
- duostack version
- bugs
x editable_elements not updated (doesn't use index anymore)
x custom_fields not deleted (doesn't use index anymore)
? editable_elements slug becomes nil
- editable_elements not updated (doesn't use index anymore)
- uploading videos http://groups.google.com/group/carrierwave/browse_thread/thread/6e211d98f1ff4bc0/51717c2167695ca2?lnk=gst&q=version#51717c2167695ca2
- editable_elements: inheritable: false (Mattias)
- duostack version
- 2 different sites on the same main domain (one in www, the other one in something else) (Raphael Costa)

View File

@ -117,6 +117,7 @@ describe AssetCollection do
it 'should add new field' do
@collection.asset_custom_fields.build :label => 'Active at', :name => 'active_at', :kind => 'Date'
@collection.upsert(:validate => false)
@collection.invalidate_asset_klass
@collection.reload
asset = @collection.assets.first
lambda { asset.active_at }.should_not raise_error
@ -125,6 +126,7 @@ describe AssetCollection do
it 'should remove field' do
@collection.asset_custom_fields.clear
@collection.upsert(:validate => false)
@collection.invalidate_asset_klass
@collection.reload
asset = @collection.assets.first
lambda { asset.active_at }.should raise_error
@ -135,6 +137,7 @@ describe AssetCollection do
@collection.asset_custom_fields.first._alias = nil
@collection.upsert(:validate => false)
@collection.invalidate_asset_klass
@collection.reload
asset = @collection.assets.first

View File

@ -6,6 +6,7 @@ describe Page do
before(:each) do
Site.any_instance.stubs(:create_default_pages!).returns(true)
Page.any_instance.stubs(:set_default_raw_template).returns(true)
end
it 'should have a valid factory' do
@ -205,19 +206,19 @@ describe Page do
end
end
describe 'listed extension' do
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 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
describe 'redirect extension' do