Commit 54151a76acdd7718c0a8cbe4d40d74204d2c80d1
1 parent
cb2af988
Exists in
master
and in
29 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,12 +5,12 @@ class ProfileDesignController; def rescue_action(e) raise e end; end | ||
5 | 5 | ||
6 | class ProfileDesignControllerTest < ActionController::TestCase | 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 | PERSON_BLOCKS = COMMOM_BLOCKS + [FriendsBlock, FavoriteEnterprisesBlock, CommunitiesBlock, EnterprisesBlock ] | 9 | PERSON_BLOCKS = COMMOM_BLOCKS + [FriendsBlock, FavoriteEnterprisesBlock, CommunitiesBlock, EnterprisesBlock ] |
10 | PERSON_BLOCKS_WITH_MEMBERS = PERSON_BLOCKS + [MembersBlock] | 10 | PERSON_BLOCKS_WITH_MEMBERS = PERSON_BLOCKS + [MembersBlock] |
11 | PERSON_BLOCKS_WITH_BLOG = PERSON_BLOCKS + [BlogArchivesBlock] | 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 | ENTERPRISE_BLOCKS_WITH_PRODUCTS_ENABLE = ENTERPRISE_BLOCKS + [ProductsBlock] | 14 | ENTERPRISE_BLOCKS_WITH_PRODUCTS_ENABLE = ENTERPRISE_BLOCKS + [ProductsBlock] |
15 | 15 | ||
16 | attr_reader :holder | 16 | attr_reader :holder |
@@ -295,17 +295,17 @@ class ProfileDesignControllerTest < ActionController::TestCase | @@ -295,17 +295,17 @@ class ProfileDesignControllerTest < ActionController::TestCase | ||
295 | should 'offer to create blog archives block only if has blog' do | 295 | should 'offer to create blog archives block only if has blog' do |
296 | holder.articles << Blog.new(:name => 'Blog test', :profile => holder) | 296 | holder.articles << Blog.new(:name => 'Blog test', :profile => holder) |
297 | get :add_block, :profile => 'designtestuser' | 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 | end | 299 | end |
300 | 300 | ||
301 | should 'not offer to create blog archives block if user dont have blog' do | 301 | should 'not offer to create blog archives block if user dont have blog' do |
302 | get :add_block, :profile => 'designtestuser' | 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 | end | 304 | end |
305 | 305 | ||
306 | should 'offer to create feed reader block' do | 306 | should 'offer to create feed reader block' do |
307 | get :add_block, :profile => 'designtestuser' | 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 | end | 309 | end |
310 | 310 | ||
311 | should 'be able to edit FeedReaderBlock' do | 311 | should 'be able to edit FeedReaderBlock' do |
@@ -421,14 +421,14 @@ class ProfileDesignControllerTest < ActionController::TestCase | @@ -421,14 +421,14 @@ class ProfileDesignControllerTest < ActionController::TestCase | ||
421 | profile.stubs(:is_admin?).with(profile.environment).returns(true) | 421 | profile.stubs(:is_admin?).with(profile.environment).returns(true) |
422 | @controller.stubs(:user).returns(profile) | 422 | @controller.stubs(:user).returns(profile) |
423 | get :add_block, :profile => 'designtestuser' | 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 | end | 425 | end |
426 | 426 | ||
427 | should 'not allow normal users to add RawHTMLBlock' do | 427 | should 'not allow normal users to add RawHTMLBlock' do |
428 | profile.stubs(:is_admin?).with(profile.environment).returns(false) | 428 | profile.stubs(:is_admin?).with(profile.environment).returns(false) |
429 | @controller.stubs(:user).returns(profile) | 429 | @controller.stubs(:user).returns(profile) |
430 | get :add_block, :profile => 'designtestuser' | 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 | end | 432 | end |
433 | 433 | ||
434 | should 'editing article block displays right selected article' do | 434 | should 'editing article block displays right selected article' do |