mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
Removes calls to #assert_template and #assigns in functional tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@15695 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -27,7 +27,7 @@ class GroupsControllerTest < Redmine::ControllerTest
|
||||
def test_index
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_template 'index'
|
||||
assert_select 'table.groups'
|
||||
end
|
||||
|
||||
def test_index_should_show_user_count
|
||||
@@ -39,7 +39,6 @@ class GroupsControllerTest < Redmine::ControllerTest
|
||||
def test_show
|
||||
get :show, :id => 10
|
||||
assert_response :success
|
||||
assert_template 'show'
|
||||
end
|
||||
|
||||
def test_show_invalid_should_return_404
|
||||
@@ -50,7 +49,6 @@ class GroupsControllerTest < Redmine::ControllerTest
|
||||
def test_new
|
||||
get :new
|
||||
assert_response :success
|
||||
assert_template 'new'
|
||||
assert_select 'input[name=?]', 'group[name]'
|
||||
end
|
||||
|
||||
@@ -78,13 +76,12 @@ class GroupsControllerTest < Redmine::ControllerTest
|
||||
post :create, :group => {:name => ''}
|
||||
end
|
||||
assert_response :success
|
||||
assert_template 'new'
|
||||
assert_select_error /Name cannot be blank/i
|
||||
end
|
||||
|
||||
def test_edit
|
||||
get :edit, :id => 10
|
||||
assert_response :success
|
||||
assert_template 'edit'
|
||||
|
||||
assert_select 'div#tab-content-users'
|
||||
assert_select 'div#tab-content-memberships' do
|
||||
@@ -103,7 +100,7 @@ class GroupsControllerTest < Redmine::ControllerTest
|
||||
def test_update_with_failure
|
||||
put :update, :id => 10, :group => {:name => ''}
|
||||
assert_response :success
|
||||
assert_template 'edit'
|
||||
assert_select_error /Name cannot be blank/i
|
||||
end
|
||||
|
||||
def test_destroy
|
||||
@@ -116,7 +113,7 @@ class GroupsControllerTest < Redmine::ControllerTest
|
||||
def test_new_users
|
||||
get :new_users, :id => 10
|
||||
assert_response :success
|
||||
assert_template 'new_users'
|
||||
assert_select 'input[name=?]', 'user_search'
|
||||
end
|
||||
|
||||
def test_xhr_new_users
|
||||
@@ -135,7 +132,6 @@ class GroupsControllerTest < Redmine::ControllerTest
|
||||
assert_difference 'Group.find(10).users.count', 2 do
|
||||
xhr :post, :add_users, :id => 10, :user_ids => ['2', '3']
|
||||
assert_response :success
|
||||
assert_template 'add_users'
|
||||
assert_equal 'text/javascript', response.content_type
|
||||
end
|
||||
assert_match /John Smith/, response.body
|
||||
@@ -151,7 +147,6 @@ class GroupsControllerTest < Redmine::ControllerTest
|
||||
assert_difference 'Group.find(10).users.count', -1 do
|
||||
xhr :delete, :remove_user, :id => 10, :user_id => '8'
|
||||
assert_response :success
|
||||
assert_template 'remove_user'
|
||||
assert_equal 'text/javascript', response.content_type
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user