summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-05-30 06:37:52 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-05-30 06:37:52 +0000
commitdd8bef1b07579dc9c76911de580e7286b122dbfa (patch)
treeba7ef437059552a5e907b2f37ab0c54300923070 /test
parent9fb1c60ef2af523d8291da233fe909cb2fa50201 (diff)
downloadredmine-dd8bef1b07579dc9c76911de580e7286b122dbfa.tar.gz
redmine-dd8bef1b07579dc9c76911de580e7286b122dbfa.zip
Merged r21605 to 5.0-stable (#37130).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21623 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/issues_controller_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 9b1842e0d..60d1ff638 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -8386,6 +8386,21 @@ class IssuesControllerTest < Redmine::ControllerTest
end
end
+ def test_show_should_be_able_to_link_to_another_journal_attachment_of_the_same_issue
+ @request.session[:user_id] = 1
+ issue = Issue.find(2)
+ attachment = issue.journals.first.attachments.first
+
+ issue.init_journal(User.first, "attachment:#{attachment.filename}")
+ issue.save!
+ issue.reload
+
+ get :show, params: { id: issue.id }
+ assert_select "div#history div#journal-#{issue.journals.last.id}-notes" do
+ assert_select "a[href='/attachments/#{attachment.id}']", :text => 'source.rb'
+ end
+ end
+
def test_index_should_retrieve_default_query
query = IssueQuery.find(4)
IssueQuery.stubs(:default).returns query