diff --git a/test/functional/profile_editor_controller_test.rb b/test/functional/profile_editor_controller_test.rb index 565638b..725b3d8 100644 --- a/test/functional/profile_editor_controller_test.rb +++ b/test/functional/profile_editor_controller_test.rb @@ -207,6 +207,23 @@ class ProfileEditorControllerTest < Test::Unit::TestCase assert_equal false, Profile['ze'].public_profile end + should 'display profile publication option in edit profile screen' do + profile = Profile['ze'] + get :edit, :profile => 'ze' + assert_tag :tag => 'input', :attributes => { :type => 'checkbox', :checked => 'checked', :name => 'profile_data[public_profile]', :value => 'true' } + assert_tag :tag => 'input', :attributes => { :type => 'hidden', :name => 'profile_data[public_profile]', :value => false } + end + + should 'save profile publication option set to true' do + post :edit, :profile => 'ze', :profile_data => { :public_profile => 'true' } + assert_equal true, Profile['ze'].public_profile + end + + should 'save profile publication option set to false' do + post :edit, :profile => 'ze', :profile_data => { :public_profile => 'false' } + assert_equal false, Profile['ze'].public_profile + end + should 'show error messages for' should 'edit enterprise' do -- libgit2 0.21.2