summaryrefslogtreecommitdiffstats
path: root/test/functional/timelog_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2020-04-05 07:39:29 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2020-04-05 07:39:29 +0000
commit214ec3e80655da61874fe0557849cfef8b063fdb (patch)
tree628b4788c410eb89fd11247eb23aabe73cee4a22 /test/functional/timelog_controller_test.rb
parentc4ff55ac9bd8513f85d8a600274e6cfb96cd436a (diff)
downloadredmine-214ec3e80655da61874fe0557849cfef8b063fdb.tar.gz
redmine-214ec3e80655da61874fe0557849cfef8b063fdb.zip
Time entries csv export should check issue visibility (#33075).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@19646 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/timelog_controller_test.rb')
-rw-r--r--test/functional/timelog_controller_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index b57dfb8c3..a9da5fa42 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -1418,6 +1418,19 @@ class TimelogControllerTest < Redmine::ControllerTest
assert_include "#{issue.tracker} #1: #{issue.subject}", line
end
+ def test_index_csv_should_fill_issue_column_with_issue_id_if_issue_that_is_not_visible
+ @request.session[:user_id] = 3
+ issue = Issue.generate!(:author_id => 1, :is_private => true)
+ entry = TimeEntry.generate!(:issue => issue, :comments => "Issue column content test")
+
+ get :index, :params => {:format => 'csv'}
+ assert_not issue.visible?
+ line = response.body.split("\n").detect {|l| l.include?(entry.comments)}
+ assert_not_nil line
+ assert_not_include "#{issue.tracker} ##{issue.id}: #{issue.subject}", line
+ assert_include "##{issue.id}", line
+ end
+
def test_index_grouped_by_created_on
skip unless TimeEntryQuery.new.groupable_columns.detect {|c| c.name == :created_on}