summaryrefslogtreecommitdiffstats
path: root/test/functional/issue_categories_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-18 21:26:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-18 21:26:30 +0000
commitec31b616982f137abdee8d0c6aa9dc4a6d103189 (patch)
treee4f5dc564be2b4ce5047a1f5acb2790fdc3b70ca /test/functional/issue_categories_controller_test.rb
parent1db54e228d98d20536133bf52a8af0ce67616dc3 (diff)
downloadredmine-ec31b616982f137abdee8d0c6aa9dc4a6d103189.tar.gz
redmine-ec31b616982f137abdee8d0c6aa9dc4a6d103189.zip
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
Diffstat (limited to 'test/functional/issue_categories_controller_test.rb')
-rw-r--r--test/functional/issue_categories_controller_test.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/functional/issue_categories_controller_test.rb b/test/functional/issue_categories_controller_test.rb
index 51092859a..908d4d1c5 100644
--- a/test/functional/issue_categories_controller_test.rb
+++ b/test/functional/issue_categories_controller_test.rb
@@ -30,7 +30,6 @@ class IssueCategoriesControllerTest < Redmine::ControllerTest
@request.session[:user_id] = 2 # manager
get :new, :project_id => '1'
assert_response :success
- assert_template 'new'
assert_select 'input[name=?]', 'issue_category[name]'
end
@@ -39,7 +38,6 @@ class IssueCategoriesControllerTest < Redmine::ControllerTest
xhr :get, :new, :project_id => '1'
assert_response :success
- assert_template 'new'
assert_equal 'text/javascript', response.content_type
end
@@ -58,7 +56,7 @@ class IssueCategoriesControllerTest < Redmine::ControllerTest
@request.session[:user_id] = 2
post :create, :project_id => '1', :issue_category => {:name => ''}
assert_response :success
- assert_template 'new'
+ assert_select_error /Name cannot be blank/i
end
def test_create_from_issue_form
@@ -70,7 +68,6 @@ class IssueCategoriesControllerTest < Redmine::ControllerTest
assert_equal 'New category', category.name
assert_response :success
- assert_template 'create'
assert_equal 'text/javascript', response.content_type
end
@@ -81,15 +78,14 @@ class IssueCategoriesControllerTest < Redmine::ControllerTest
end
assert_response :success
- assert_template 'new'
assert_equal 'text/javascript', response.content_type
+ assert_include 'Name cannot be blank', response.body
end
def test_edit
@request.session[:user_id] = 2
get :edit, :id => 2
assert_response :success
- assert_template 'edit'
assert_select 'input[name=?][value=?]', 'issue_category[name]', 'Recipes'
end
@@ -104,7 +100,7 @@ class IssueCategoriesControllerTest < Redmine::ControllerTest
def test_update_failure
put :update, :id => 2, :issue_category => { :name => '' }
assert_response :success
- assert_template 'edit'
+ assert_select_error /Name cannot be blank/i
end
def test_update_not_found
@@ -121,8 +117,8 @@ class IssueCategoriesControllerTest < Redmine::ControllerTest
def test_destroy_category_in_use
delete :destroy, :id => 1
assert_response :success
- assert_template 'destroy'
assert_not_nil IssueCategory.find_by_id(1)
+ assert_select 'select[name=?]', 'reassign_to_id'
end
def test_destroy_category_in_use_with_reassignment