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:
parent
3782836e73
commit
424393c28c
|
@ -131,7 +131,8 @@ class WatchersControllerTest < ActionController::TestCase
|
||||||
def test_create
|
def test_create
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
assert_difference('Watcher.count') do
|
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_response :success
|
||||||
assert_match /watchers/, response.body
|
assert_match /watchers/, response.body
|
||||||
assert_match /ajax-modal/, response.body
|
assert_match /ajax-modal/, response.body
|
||||||
|
@ -142,7 +143,8 @@ class WatchersControllerTest < ActionController::TestCase
|
||||||
def test_create_multiple
|
def test_create_multiple
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
assert_difference('Watcher.count', 2) do
|
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_response :success
|
||||||
assert_match /watchers/, response.body
|
assert_match /watchers/, response.body
|
||||||
assert_match /ajax-modal/, response.body
|
assert_match /ajax-modal/, response.body
|
||||||
|
@ -164,13 +166,13 @@ class WatchersControllerTest < ActionController::TestCase
|
||||||
|
|
||||||
def test_autocomplete_on_watchable_update
|
def test_autocomplete_on_watchable_update
|
||||||
@request.session[:user_id] = 2
|
@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_response :success
|
||||||
assert_select 'input', :count => 3
|
assert_select 'input', :count => 3
|
||||||
assert_select 'input[name=?][value=2]', 'watcher[user_ids][]'
|
assert_select 'input[name=?][value=2]', 'watcher[user_ids][]'
|
||||||
assert_select 'input[name=?][value=8]', 'watcher[user_ids][]'
|
assert_select 'input[name=?][value=8]', 'watcher[user_ids][]'
|
||||||
assert_select 'input[name=?][value=9]', 'watcher[user_ids][]'
|
assert_select 'input[name=?][value=9]', 'watcher[user_ids][]'
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_append
|
def test_append
|
||||||
|
|
Loading…
Reference in New Issue