95 |
95 |
assert_include "Non", csv
|
96 |
96 |
end
|
97 |
97 |
end
|
|
98 |
|
|
99 |
def test_csv_value
|
|
100 |
c_hours = QueryColumn.new(:hours)
|
|
101 |
c_estimated_hours = QueryColumn.new(:estimated_hours)
|
|
102 |
c_hourtotal_estimated_s = QueryColumn.new(:total_estimated_hours)
|
|
103 |
c_spent_hours = QueryColumn.new(:spent_hours)
|
|
104 |
c_total_spent_hours = QueryColumn.new(:total_spent_hours)
|
|
105 |
|
|
106 |
with_settings timespan_format: 'minutes' do
|
|
107 |
assert_equal "0:30", csv_value(c_hours, Issue.find(1), 0.5)
|
|
108 |
assert_equal "0:30", csv_value(c_estimated_hours, Issue.find(1), 0.5)
|
|
109 |
assert_equal "0:30", csv_value(c_hourtotal_estimated_s, Issue.find(1), 0.5)
|
|
110 |
assert_equal "0:30", csv_value(c_spent_hours, Issue.find(1), 0.5)
|
|
111 |
assert_equal "0:30", csv_value(c_total_spent_hours, Issue.find(1), 0.5)
|
|
112 |
end
|
|
113 |
|
|
114 |
with_settings timespan_format: 'decimal' do
|
|
115 |
assert_equal "0.50", csv_value(c_hours, Issue.find(1), 0.5)
|
|
116 |
assert_equal "0.50", csv_value(c_estimated_hours, Issue.find(1), 0.5)
|
|
117 |
assert_equal "0.50", csv_value(c_hourtotal_estimated_s, Issue.find(1), 0.5)
|
|
118 |
assert_equal "0.50", csv_value(c_spent_hours, Issue.find(1), 0.5)
|
|
119 |
assert_equal "0.50", csv_value(c_total_spent_hours, Issue.find(1), 0.5)
|
|
120 |
end
|
|
121 |
end
|
98 |
122 |
end
|