summaryrefslogtreecommitdiffstats
path: root/test/functional/issue_relations_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_relations_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_relations_controller_test.rb')
-rw-r--r--test/functional/issue_relations_controller_test.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/functional/issue_relations_controller_test.rb b/test/functional/issue_relations_controller_test.rb
index ca0e81571..f740e2234 100644
--- a/test/functional/issue_relations_controller_test.rb
+++ b/test/functional/issue_relations_controller_test.rb
@@ -59,14 +59,13 @@ class IssueRelationsControllerTest < Redmine::ControllerTest
assert_difference 'IssueRelation.count' do
xhr :post, :create, :issue_id => 3, :relation => {:issue_to_id => '1', :relation_type => 'relates', :delay => ''}
assert_response :success
- assert_template 'create'
assert_equal 'text/javascript', response.content_type
end
relation = IssueRelation.order('id DESC').first
assert_equal 3, relation.issue_from_id
assert_equal 1, relation.issue_to_id
- assert_match /Bug #1/, response.body
+ assert_include 'Bug #1', response.body
end
def test_create_should_accept_id_with_hash
@@ -104,7 +103,7 @@ class IssueRelationsControllerTest < Redmine::ControllerTest
xhr :post, :create, :issue_id => issue2.id,
:relation => {:issue_to_id => issue1.id, :relation_type => 'follows', :delay => ''}
end
- assert_match /Followed issue/, response.body
+ assert_include 'Followed issue', response.body
end
def test_should_create_relations_with_visible_issues_only
@@ -122,11 +121,9 @@ class IssueRelationsControllerTest < Redmine::ControllerTest
xhr :post, :create, :issue_id => 3, :relation => {:issue_to_id => '999', :relation_type => 'relates', :delay => ''}
assert_response :success
- assert_template 'create'
assert_equal 'text/javascript', response.content_type
end
-
- assert_match /errorExplanation/, response.body
+ assert_include 'Related issue cannot be blank', response.body
end
def test_destroy
@@ -152,9 +149,8 @@ class IssueRelationsControllerTest < Redmine::ControllerTest
xhr :delete, :destroy, :id => '2'
assert_response :success
- assert_template 'destroy'
assert_equal 'text/javascript', response.content_type
- assert_match /relation-2/, response.body
+ assert_include 'relation-2', response.body
end
end
end