Commit e6dbb3e982d90eb7433f98d0ef7888e0aa18da04
Exists in
master
and in
27 other branches
Merge branch 'P398-main-block-should-not-be-invible' into 'master'
Main block should not be invisible There used to happen a situation that visitors see an empty profile since the main block was not visible for all users. Now the main block user visibility can not be set for logged, not_logged or followers anymore, only to "All users". See merge request !499
Showing
3 changed files
with
18 additions
and
0 deletions
Show diff stats
app/models/main_block.rb
test/functional/profile_design_controller_test.rb
... | ... | @@ -755,4 +755,12 @@ class ProfileDesignControllerTest < ActionController::TestCase |
755 | 755 | assert_response :forbidden |
756 | 756 | end |
757 | 757 | |
758 | + should 'guarantee main block is always visible to everybody' do | |
759 | + get :edit, :profile => 'designtestuser', :id => @b4.id | |
760 | + %w[logged not_logged followers].each do |option| | |
761 | + assert_no_tag :select, :attributes => {:name => 'block[display_user]'}, | |
762 | + :descendant => {:tag => 'option', :attributes => {:value => option}} | |
763 | + end | |
764 | + end | |
765 | + | |
758 | 766 | end | ... | ... |
test/unit/main_block_test.rb