GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit 551faa05 authored by jplang's avatar jplang

Adds tests for #hours_field (#23996).

git-svn-id: https://svn.redmine.org/redmine/trunk@15974 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent bae7f37d
......@@ -27,4 +27,22 @@ class Redmine::Views::LabelledFormBuilderTest < Redmine::HelperTest
assert_equal output, '<label for="issue_subject">Subject</label>'
end
end
def test_hours_field_should_display_formatted_value_if_valid
entry = TimeEntry.new(:hours => '2.5')
entry.validate
labelled_form_for(entry) do |f|
assert_include 'value="2.50"', f.hours_field(:hours)
end
end
def test_hours_field_should_display_entered_value_if_invalid
entry = TimeEntry.new(:hours => '2.z')
entry.validate
labelled_form_for(entry) do |f|
assert_include 'value="2.z"', f.hours_field(:hours)
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment