code format clean up WatchersControllerTest

git-svn-id: http://svn.redmine.org/redmine/trunk@12392 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2013-12-09 06:15:20 +00:00
parent 3782836e73
commit 424393c28c
1 changed files with 6 additions and 4 deletions

View File

@ -131,7 +131,8 @@ class WatchersControllerTest < ActionController::TestCase
def test_create
@request.session[:user_id] = 2
assert_difference('Watcher.count') do
xhr :post, :create, :object_type => 'issue', :object_id => '2', :watcher => {:user_id => '4'}
xhr :post, :create, :object_type => 'issue', :object_id => '2',
:watcher => {:user_id => '4'}
assert_response :success
assert_match /watchers/, response.body
assert_match /ajax-modal/, response.body
@ -142,7 +143,8 @@ class WatchersControllerTest < ActionController::TestCase
def test_create_multiple
@request.session[:user_id] = 2
assert_difference('Watcher.count', 2) do
xhr :post, :create, :object_type => 'issue', :object_id => '2', :watcher => {:user_ids => ['4', '7']}
xhr :post, :create, :object_type => 'issue', :object_id => '2',
:watcher => {:user_ids => ['4', '7']}
assert_response :success
assert_match /watchers/, response.body
assert_match /ajax-modal/, response.body
@ -164,13 +166,13 @@ class WatchersControllerTest < ActionController::TestCase
def test_autocomplete_on_watchable_update
@request.session[:user_id] = 2
xhr :get, :autocomplete_for_user, :q => 'mi', :object_id => '2' , :object_type => 'issue', :project_id => 'ecookbook'
xhr :get, :autocomplete_for_user, :q => 'mi', :object_id => '2',
:object_type => 'issue', :project_id => 'ecookbook'
assert_response :success
assert_select 'input', :count => 3
assert_select 'input[name=?][value=2]', 'watcher[user_ids][]'
assert_select 'input[name=?][value=8]', 'watcher[user_ids][]'
assert_select 'input[name=?][value=9]', 'watcher[user_ids][]'
end
def test_append