summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-03-17 08:02:01 +0000
committerGo MAEDA <maeda@farend.jp>2021-03-17 08:02:01 +0000
commite2d12eeb8197ecc2a12ca31b8cc6a400bf69dffe (patch)
treed1bf6f9bf7f7922f86c5cffd0c4af83197821061 /test
parent1559dda8335e19c0624b3fa42b913f859afd808b (diff)
downloadredmine-e2d12eeb8197ecc2a12ca31b8cc6a400bf69dffe.tar.gz
redmine-e2d12eeb8197ecc2a12ca31b8cc6a400bf69dffe.zip
Merged r20801 from trunk to 4.1-stable (#33550).
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@20807 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/issues_controller_test.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index c53cfb391..2ee1a2c41 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -4875,6 +4875,41 @@ class IssuesControllerTest < Redmine::ControllerTest
end
end
+ def test_get_edit_should_display_visible_spent_time_custom_field
+ @request.session[:user_id] = 2
+
+ get(
+ :edit,
+ :params => {
+ :id => 13,
+ }
+ )
+
+ assert_response :success
+
+ assert_select '#issue-form select#time_entry_custom_field_values_10', 1
+ end
+
+ def test_get_edit_should_not_display_spent_time_custom_field_not_visible
+ cf = TimeEntryCustomField.find(10)
+ cf.visible = false
+ cf.role_ids = [1]
+ cf.save!
+
+ @request.session[:user_id] = 2
+
+ get(
+ :edit,
+ :params => {
+ :id => 13,
+ }
+ )
+
+ assert_response :success
+
+ assert_select '#issue-form select#time_entry_custom_field_values_10', 0
+ end
+
def test_update_form_for_existing_issue
@request.session[:user_id] = 2
patch :edit, :params => {