summaryrefslogtreecommitdiffstats
path: root/test/helpers
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-03-18 07:44:42 +0000
committerGo MAEDA <maeda@farend.jp>2021-03-18 07:44:42 +0000
commit0d96c4ebdb1cceeb6cac8f940a11b5407a0a5211 (patch)
tree561729fdf13f0ce915df1f3b942928f7f568fd32 /test/helpers
parenta11f9eb5d9d01b59399be616ee62c6d75445aab6 (diff)
downloadredmine-0d96c4ebdb1cceeb6cac8f940a11b5407a0a5211.tar.gz
redmine-0d96c4ebdb1cceeb6cac8f940a11b5407a0a5211.zip
Show project ID instead of name in issue journal details if the project is not visible for the current user (#33360).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20819 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/helpers')
-rw-r--r--test/helpers/issues_helper_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/helpers/issues_helper_test.rb b/test/helpers/issues_helper_test.rb
index fdd5f3598..562474f7c 100644
--- a/test/helpers/issues_helper_test.rb
+++ b/test/helpers/issues_helper_test.rb
@@ -145,12 +145,20 @@ class IssuesHelperTest < Redmine::HelperTest
end
test 'show_detail should show old and new values with a project attribute' do
+ User.current = User.find(2)
detail = JournalDetail.new(:property => 'attr', :prop_key => 'project_id',
:old_value => 1, :value => 2)
assert_match 'eCookbook', show_detail(detail, true)
assert_match 'OnlineStore', show_detail(detail, true)
end
+ test 'show_detail with a project attribute should show project ID if project is not visible' do
+ detail = JournalDetail.new(:property => 'attr', :prop_key => 'project_id',
+ :old_value => 1, :value => 2)
+ assert_match 'eCookbook', show_detail(detail, true)
+ assert_match '2', show_detail(detail, true)
+ end
+
test 'show_detail should show old and new values with a issue status attribute' do
detail = JournalDetail.new(:property => 'attr', :prop_key => 'status_id',
:old_value => 1, :value => 2)