From f892313c48d64a7b5453d2772d72648795cf363b Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 15 Oct 2013 21:14:08 +0100 Subject: [PATCH] Test user#go_public --- test/functional/user_controller_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/functional/user_controller_test.rb b/test/functional/user_controller_test.rb index 6a64fd8d8..381ec333a 100644 --- a/test/functional/user_controller_test.rb +++ b/test/functional/user_controller_test.rb @@ -359,6 +359,15 @@ class UserControllerTest < ActionController::TestCase assert_redirected_to :action => :account, :display_name => user.display_name end + def test_user_go_public + @request.cookies["_osm_username"] = users(:normal_user).display_name + + post :go_public, {}, { :user => users(:normal_user) } + assert_response :redirect + assert_redirected_to :action => :account, :display_name => users(:normal_user).display_name + assert_equal true, User.find(users(:normal_user).id).data_public + end + def test_user_lost_password # Test fetching the lost password page get :lost_password -- 2.43.2