Commit 2f3faa63f9de47c8467133c369a0563ebe1a96ef

Authored by Francisco Marcelo de Araújo Lima Júnior
1 parent e3612219

adapt functional test to new proposal to add blocks

test/functional/profile_design_controller_test.rb
@@ -528,15 +528,13 @@ class ProfileDesignControllerTest < ActionController::TestCase @@ -528,15 +528,13 @@ class ProfileDesignControllerTest < ActionController::TestCase
528 end 528 end
529 529
530 should 'allow admins to add RawHTMLBlock' do 530 should 'allow admins to add RawHTMLBlock' do
531 - profile.stubs(:is_admin?).with(profile.environment).returns(true) 531 + profile.stubs(:is_admin?).with(anything).returns(true)
532 @controller.stubs(:user).returns(profile) 532 @controller.stubs(:user).returns(profile)
533 get :index, :profile => 'designtestuser' 533 get :index, :profile => 'designtestuser'
534 assert_tag :tag => 'div', :attributes => { :id => 'block-RawHTMLBlock' } 534 assert_tag :tag => 'div', :attributes => { :id => 'block-RawHTMLBlock' }
535 end 535 end
536 536
537 should 'not allow normal users to add RawHTMLBlock' do 537 should 'not allow normal users to add RawHTMLBlock' do
538 - profile.stubs(:is_admin?).with(profile.environment).returns(false)  
539 - @controller.stubs(:user).returns(profile)  
540 get :index, :profile => 'designtestuser' 538 get :index, :profile => 'designtestuser'
541 assert_no_tag :tag => 'div', :attributes => { :id => 'block-RawHTMLBlock' } 539 assert_no_tag :tag => 'div', :attributes => { :id => 'block-RawHTMLBlock' }
542 end 540 end