Commit 54151a76acdd7718c0a8cbe4d40d74204d2c80d1
1 parent
cb2af988
Exists in
staging
and in
42 other branches
Fixed failing tests
Showing
1 changed file
with
7 additions
and
7 deletions
Show diff stats
test/functional/profile_design_controller_test.rb
| ... | ... | @@ -5,12 +5,12 @@ class ProfileDesignController; def rescue_action(e) raise e end; end |
| 5 | 5 | |
| 6 | 6 | class ProfileDesignControllerTest < ActionController::TestCase |
| 7 | 7 | |
| 8 | - COMMOM_BLOCKS = [ ArticleBlock, TagsBlock, RecentDocumentsBlock, ProfileInfoBlock, LinkListBlock, MyNetworkBlock, FeedReaderBlock, ProfileImageBlock, LocationBlock, SlideshowBlock, ProfileSearchBlock ] | |
| 8 | + COMMOM_BLOCKS = [ ArticleBlock, TagsBlock, RecentDocumentsBlock, ProfileInfoBlock, LinkListBlock, MyNetworkBlock, FeedReaderBlock, ProfileImageBlock, LocationBlock, SlideshowBlock, ProfileSearchBlock, HighlightsBlock ] | |
| 9 | 9 | PERSON_BLOCKS = COMMOM_BLOCKS + [FriendsBlock, FavoriteEnterprisesBlock, CommunitiesBlock, EnterprisesBlock ] |
| 10 | 10 | PERSON_BLOCKS_WITH_MEMBERS = PERSON_BLOCKS + [MembersBlock] |
| 11 | 11 | PERSON_BLOCKS_WITH_BLOG = PERSON_BLOCKS + [BlogArchivesBlock] |
| 12 | 12 | |
| 13 | - ENTERPRISE_BLOCKS = COMMOM_BLOCKS + [DisabledEnterpriseMessageBlock, HighlightsBlock, FeaturedProductsBlock, FansBlock] | |
| 13 | + ENTERPRISE_BLOCKS = COMMOM_BLOCKS + [DisabledEnterpriseMessageBlock, FeaturedProductsBlock, FansBlock] | |
| 14 | 14 | ENTERPRISE_BLOCKS_WITH_PRODUCTS_ENABLE = ENTERPRISE_BLOCKS + [ProductsBlock] |
| 15 | 15 | |
| 16 | 16 | attr_reader :holder |
| ... | ... | @@ -295,17 +295,17 @@ class ProfileDesignControllerTest < ActionController::TestCase |
| 295 | 295 | should 'offer to create blog archives block only if has blog' do |
| 296 | 296 | holder.articles << Blog.new(:name => 'Blog test', :profile => holder) |
| 297 | 297 | get :add_block, :profile => 'designtestuser' |
| 298 | - assert_tag :tag => 'input', :attributes => { :id => 'type_blogarchivesblock', :value => 'BlogArchivesBlock' } | |
| 298 | + assert_tag :tag => 'input', :attributes => { :name => 'type', :value => 'BlogArchivesBlock' } | |
| 299 | 299 | end |
| 300 | 300 | |
| 301 | 301 | should 'not offer to create blog archives block if user dont have blog' do |
| 302 | 302 | get :add_block, :profile => 'designtestuser' |
| 303 | - assert_no_tag :tag => 'input', :attributes => { :id => 'type_blogarchivesblock', :value => 'BlogArchivesBlock' } | |
| 303 | + assert_no_tag :tag => 'input', :attributes => { :name => 'type', :value => 'BlogArchivesBlock' } | |
| 304 | 304 | end |
| 305 | 305 | |
| 306 | 306 | should 'offer to create feed reader block' do |
| 307 | 307 | get :add_block, :profile => 'designtestuser' |
| 308 | - assert_tag :tag => 'input', :attributes => { :id => 'type_feedreaderblock', :value => 'FeedReaderBlock' } | |
| 308 | + assert_tag :tag => 'input', :attributes => { :name => 'type', :value => 'FeedReaderBlock' } | |
| 309 | 309 | end |
| 310 | 310 | |
| 311 | 311 | should 'be able to edit FeedReaderBlock' do |
| ... | ... | @@ -421,14 +421,14 @@ class ProfileDesignControllerTest < ActionController::TestCase |
| 421 | 421 | profile.stubs(:is_admin?).with(profile.environment).returns(true) |
| 422 | 422 | @controller.stubs(:user).returns(profile) |
| 423 | 423 | get :add_block, :profile => 'designtestuser' |
| 424 | - assert_tag :tag => 'input', :attributes => { :id => 'type_rawhtmlblock', :value => 'RawHTMLBlock' } | |
| 424 | + assert_tag :tag => 'input', :attributes => { :name => 'type', :value => 'RawHTMLBlock' } | |
| 425 | 425 | end |
| 426 | 426 | |
| 427 | 427 | should 'not allow normal users to add RawHTMLBlock' do |
| 428 | 428 | profile.stubs(:is_admin?).with(profile.environment).returns(false) |
| 429 | 429 | @controller.stubs(:user).returns(profile) |
| 430 | 430 | get :add_block, :profile => 'designtestuser' |
| 431 | - assert_no_tag :tag => 'input', :attributes => { :id => 'type_rawhtmlblock', :value => 'RawHTMLBlock' } | |
| 431 | + assert_no_tag :tag => 'input', :attributes => { :name => 'type', :value => 'RawHTMLBlock' } | |
| 432 | 432 | end |
| 433 | 433 | |
| 434 | 434 | should 'editing article block displays right selected article' do | ... | ... |