summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-01-11 12:26:44 +0000
committerGo MAEDA <maeda@farend.jp>2021-01-11 12:26:44 +0000
commit354d30df31bbc783aa512ce603ee53d604b0c64d (patch)
tree0c2db08c5141dd019a22f22cb917ec969e0ed54b /test/functional
parentd64a2934ff6d6dd1f540bd8f025b7a41ec8eecfb (diff)
downloadredmine-354d30df31bbc783aa512ce603ee53d604b0c64d.tar.gz
redmine-354d30df31bbc783aa512ce603ee53d604b0c64d.zip
Add class 'error' to custom fields with validation errors (#32764, #34580).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20710 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/issues_controller_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index cb04adad6..83b5a911f 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -4061,6 +4061,8 @@ class IssuesControllerTest < Redmine::ControllerTest
)
end
assert_response :success
+
+ assert_select 'label[for=?][class=?]', "issue_custom_field_values_#{field.id}", 'error'
assert_select_error /Database cannot be blank/
end
@@ -4094,6 +4096,10 @@ class IssuesControllerTest < Redmine::ControllerTest
)
assert_response :success
end
+
+ assert_select 'label[for=?][class=?]', 'issue_due_date', 'error'
+ assert_select 'label[for=?][class=?]', "issue_custom_field_values_#{cf2.id}", 'error'
+
assert_select_error /Due date cannot be blank/i
assert_select_error /Bar cannot be blank/i
end