From 6e93adbec3915cb92ed280378dfe3ace5c3790cb Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sun, 7 Mar 2021 06:46:41 +0000 Subject: Move some action links for issues and journals to the dropdown menu (#34714). Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@20765 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/helpers/journals_helper_test.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'test/helpers') diff --git a/test/helpers/journals_helper_test.rb b/test/helpers/journals_helper_test.rb index a3475c6ab..218b9498a 100644 --- a/test/helpers/journals_helper_test.rb +++ b/test/helpers/journals_helper_test.rb @@ -22,7 +22,7 @@ require File.expand_path('../../test_helper', __FILE__) class JournalsHelperTest < Redmine::HelperTest include JournalsHelper - fixtures :projects, :trackers, :issue_statuses, :issues, + fixtures :projects, :trackers, :issue_statuses, :issues, :journals, :enumerations, :issue_categories, :projects_trackers, :users, :roles, :member_roles, :members, @@ -49,4 +49,15 @@ class JournalsHelperTest < Redmine::HelperTest assert_kind_of Attachment, thumbnails.first assert_equal 'image.png', thumbnails.first.filename end + + def test_render_journal_actions_should_return_edit_link_and_actions_dropdown + User.current = User.find(1) + issue = Issue.find(1) + journals = issue.visible_journals_with_index # add indice + journal_actions = render_journal_actions(issue, journals.first, {reply_links: true}) + + assert_select_in journal_actions, 'a[title=?][class="icon-only icon-comment"]', 'Quote' + assert_select_in journal_actions, 'a[title=?][class="icon-only icon-edit"]', 'Edit' + assert_select_in journal_actions, 'div[class="drdn-items"] a[class="icon icon-del"]' + end end -- cgit v1.2.3