Negative estimated hours should not be valid (#12735).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11125 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -79,6 +79,15 @@ class IssueTest < ActiveSupport::TestCase
|
||||
assert_include 'Due date must be greater than start date', issue.errors.full_messages
|
||||
end
|
||||
|
||||
def test_estimated_hours_should_be_validated
|
||||
set_language_if_valid 'en'
|
||||
['-2'].each do |invalid|
|
||||
issue = Issue.new(:estimated_hours => invalid)
|
||||
assert !issue.valid?
|
||||
assert_include 'Estimated time is invalid', issue.errors.full_messages
|
||||
end
|
||||
end
|
||||
|
||||
def test_create_with_required_custom_field
|
||||
set_language_if_valid 'en'
|
||||
field = IssueCustomField.find_by_name('Database')
|
||||
|
||||
Reference in New Issue
Block a user