25 |
25 |
|
26 |
26 |
include Redmine::Export::PDF::IssuesPdfHelper
|
27 |
27 |
|
28 |
|
def test_fetch_row_values_should_round_float_values
|
|
28 |
def test_fetch_row_values_should_follow_timestamp_format_setting
|
29 |
29 |
query = IssueQuery.new(:project => Project.find(1), :name => '_')
|
30 |
30 |
query.column_names = [:subject, :spent_hours]
|
31 |
31 |
issue = Issue.find(2)
|
... | ... | |
33 |
33 |
time_entry = TimeEntry.create!(:spent_on => Date.today, :hours => 4.3432, :user => user, :author => user,
|
34 |
34 |
:project_id => 1, :issue => issue, :activity => TimeEntryActivity.first)
|
35 |
35 |
|
36 |
|
results = fetch_row_values(issue, query, 0)
|
37 |
|
assert_equal ["2", "Add ingredients categories", "4.34"], results
|
|
36 |
with_settings timespan_format: 'decimal' do
|
|
37 |
results = fetch_row_values(issue, query, 0)
|
|
38 |
assert_equal ["2", "Add ingredients categories", "4.34"], results
|
|
39 |
end
|
|
40 |
|
|
41 |
with_settings timespan_format: 'minutes' do
|
|
42 |
results = fetch_row_values(issue, query, 0)
|
|
43 |
assert_equal ["2", "Add ingredients categories", "4:21"], results
|
|
44 |
end
|
38 |
45 |
end
|
39 |
46 |
|
40 |
47 |
def test_fetch_row_values_should_be_able_to_handle_parent_issue_subject
|