@ -62,7 +62,8 @@ class TimeEntryActivityTest < ActiveSupport::TestCase
e = TimeEntryActivity . new ( name : 'Custom Data' )
assert ! e . save
assert_include e . errors [ :custom_values ] , I18n . translate ( 'activerecord.errors.messages.invalid' )
assert_include e . errors [ " custom_field_ #{ field . id } " ] ,
I18n . translate ( 'activerecord.errors.messages.blank' )
end
def test_create_with_required_custom_field_should_succeed
@ -85,7 +86,7 @@ class TimeEntryActivityTest < ActiveSupport::TestCase
# Blanking custom field, save should fail
e . custom_field_values = { field . id = > '' }
assert ! e . save
refute_empty e . errors [ :custom_values ]
refute_empty e . errors [ " custom_field_ #{ field . id } " ]
# Update custom field to valid value, save should succeed
e . custom_field_values = { field . id = > '0' }