summaryrefslogtreecommitdiffstats
path: root/test/functional/issue_relations_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-02-24 09:59:45 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-02-24 09:59:45 +0000
commit8e17c2aeaccdb5f166877e2b74fd1abe00506f48 (patch)
tree464815dab941c71c19aaa3b7c4b2fa9795c9ffc2 /test/functional/issue_relations_controller_test.rb
parent85b872f340507d40c5f75e948b621952c7946cb3 (diff)
downloadredmine-8e17c2aeaccdb5f166877e2b74fd1abe00506f48.tar.gz
redmine-8e17c2aeaccdb5f166877e2b74fd1abe00506f48.zip
Fixed that relations may not be refreshed when adding a follows relation (#13251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11461 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/issue_relations_controller_test.rb')
-rw-r--r--test/functional/issue_relations_controller_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/issue_relations_controller_test.rb b/test/functional/issue_relations_controller_test.rb
index 61d3612c1..a11a459a6 100644
--- a/test/functional/issue_relations_controller_test.rb
+++ b/test/functional/issue_relations_controller_test.rb
@@ -87,6 +87,17 @@ class IssueRelationsControllerTest < ActionController::TestCase
end
end
+ def test_create_follows_relation_should_update_relations_list
+ issue1 = Issue.generate!(:subject => 'Followed issue', :start_date => Date.yesterday, :due_date => Date.today)
+ issue2 = Issue.generate!
+
+ assert_difference 'IssueRelation.count' do
+ xhr :post, :create, :issue_id => issue2.id,
+ :relation => {:issue_to_id => issue1.id, :relation_type => 'follows', :delay => ''}
+ end
+ assert_match /Followed issue/, response.body
+ end
+
def test_should_create_relations_with_visible_issues_only
Setting.cross_project_issue_relations = '1'
assert_nil Issue.visible(User.find(3)).find_by_id(4)