summaryrefslogtreecommitdiffstats
path: root/test/helpers
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-03-18 08:56:40 +0000
committerGo MAEDA <maeda@farend.jp>2021-03-18 08:56:40 +0000
commit4e4985d75c83de5b46c5d2323844e29057d70b5a (patch)
tree6d8d7e294b23423d510969bfea01432ddcc14892 /test/helpers
parentd5f1ebdf10640498bcb6a62c123152c954ff1422 (diff)
downloadredmine-4e4985d75c83de5b46c5d2323844e29057d70b5a.tar.gz
redmine-4e4985d75c83de5b46c5d2323844e29057d70b5a.zip
Merged r20819 from trunk to 4.1-stable (#33360).
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@20820 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 afa33a631..89c9de0ef 100644
--- a/test/helpers/issues_helper_test.rb
+++ b/test/helpers/issues_helper_test.rb
@@ -143,12 +143,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)