mirror of
https://github.com/redmine/redmine.git
synced 2025-12-16 05:20:28 +01:00
fix source indent of test/unit/time_entry_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20211 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -68,25 +68,25 @@ class TimeEntryTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
def test_hours_format
|
||||
assertions = { "2" => 2.0,
|
||||
"21.1" => 21.1,
|
||||
"2,1" => 2.1,
|
||||
"1,5h" => 1.5,
|
||||
"7:12" => 7.2,
|
||||
"10h" => 10.0,
|
||||
"10 h" => 10.0,
|
||||
"45m" => 0.75,
|
||||
"45 m" => 0.75,
|
||||
"3h15" => 3.25,
|
||||
"3h 15" => 3.25,
|
||||
"3 h 15" => 3.25,
|
||||
"3 h 15m" => 3.25,
|
||||
"3 h 15 m" => 3.25,
|
||||
"3 hours" => 3.0,
|
||||
"12min" => 0.2,
|
||||
"12 Min" => 0.2,
|
||||
}
|
||||
|
||||
assertions = {
|
||||
"2" => 2.0,
|
||||
"21.1" => 21.1,
|
||||
"2,1" => 2.1,
|
||||
"1,5h" => 1.5,
|
||||
"7:12" => 7.2,
|
||||
"10h" => 10.0,
|
||||
"10 h" => 10.0,
|
||||
"45m" => 0.75,
|
||||
"45 m" => 0.75,
|
||||
"3h15" => 3.25,
|
||||
"3h 15" => 3.25,
|
||||
"3 h 15" => 3.25,
|
||||
"3 h 15m" => 3.25,
|
||||
"3 h 15 m" => 3.25,
|
||||
"3 hours" => 3.0,
|
||||
"12min" => 0.2,
|
||||
"12 Min" => 0.2,
|
||||
}
|
||||
assertions.each do |k, v|
|
||||
t = TimeEntry.new(:hours => k)
|
||||
assert_equal v, t.hours, "Converting #{k} failed:"
|
||||
|
||||
Reference in New Issue
Block a user