summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-05-28 07:07:00 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-05-28 07:07:00 +0000
commit87783362cf8b4cd13df0373500f4ab507d10128d (patch)
treef3c75bb2bc96d760e514a8e12f6a96e4dc2cb050 /test/functional
parent9aef7a32425ddfc082a5d618c4f6b7f70412c85f (diff)
downloadredmine-87783362cf8b4cd13df0373500f4ab507d10128d.tar.gz
redmine-87783362cf8b4cd13df0373500f4ab507d10128d.zip
code layout cleanup test/functional/users_controller_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9730 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/users_controller_test.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index 0faaf03ae..4ed37c73d 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -24,7 +24,9 @@ class UsersController; def rescue_action(e) raise e end; end
class UsersControllerTest < ActionController::TestCase
include Redmine::I18n
- fixtures :users, :projects, :members, :member_roles, :roles, :custom_fields, :custom_values, :groups_users, :auth_sources
+ fixtures :users, :projects, :members, :member_roles, :roles,
+ :custom_fields, :custom_values, :groups_users,
+ :auth_sources
def setup
@controller = UsersController.new
@@ -156,7 +158,6 @@ class UsersControllerTest < ActionController::TestCase
def test_new
get :new
-
assert_response :success
assert_template :new
assert assigns(:user)
@@ -228,14 +229,12 @@ class UsersControllerTest < ActionController::TestCase
assert_no_difference 'User.count' do
post :create, :user => {}
end
-
assert_response :success
assert_template 'new'
end
def test_edit
get :edit, :id => 2
-
assert_response :success
assert_template 'edit'
assert_equal User.find(2), assigns(:user)
@@ -243,8 +242,9 @@ class UsersControllerTest < ActionController::TestCase
def test_update
ActionMailer::Base.deliveries.clear
- put :update, :id => 2, :user => {:firstname => 'Changed', :mail_notification => 'only_assigned'}, :pref => {:hide_mail => '1', :comments_sorting => 'desc'}
-
+ put :update, :id => 2,
+ :user => {:firstname => 'Changed', :mail_notification => 'only_assigned'},
+ :pref => {:hide_mail => '1', :comments_sorting => 'desc'}
user = User.find(2)
assert_equal 'Changed', user.firstname
assert_equal 'only_assigned', user.mail_notification
@@ -257,14 +257,12 @@ class UsersControllerTest < ActionController::TestCase
assert_no_difference 'User.count' do
put :update, :id => 2, :user => {:firstname => ''}
end
-
assert_response :success
assert_template 'edit'
end
def test_update_with_group_ids_should_assign_groups
put :update, :id => 2, :user => {:group_ids => ['10']}
-
user = User.find(2)
assert_equal [10], user.group_ids
end