43 |
43 |
def test_add_issue_with_specific_overrides
|
44 |
44 |
issue = submit_email('ticket_on_given_project.eml',
|
45 |
45 |
:allow_override => ['status', 'start_date', 'due_date', 'assigned_to',
|
46 |
|
'fixed_version', 'estimated_hours', 'done_ratio']
|
|
46 |
'fixed_version', 'estimated_hours', 'done_ratio', 'parent_issue']
|
47 |
47 |
)
|
48 |
48 |
assert issue.is_a?(Issue)
|
49 |
49 |
assert !issue.new_record?
|
... | ... | |
60 |
60 |
assert_equal Version.find_by_name('Alpha'), issue.fixed_version
|
61 |
61 |
assert_equal 2.5, issue.estimated_hours
|
62 |
62 |
assert_equal 30, issue.done_ratio
|
|
63 |
assert_equal Issue.find(4), issue.parent
|
63 |
64 |
# keywords should be removed from the email body
|
64 |
65 |
assert !issue.description.match(/^Project:/i)
|
65 |
66 |
assert !issue.description.match(/^Status:/i)
|
... | ... | |
81 |
82 |
assert_equal Version.find_by_name('Alpha'), issue.fixed_version
|
82 |
83 |
assert_equal 2.5, issue.estimated_hours
|
83 |
84 |
assert_equal 30, issue.done_ratio
|
|
85 |
assert_equal Issue.find(4), issue.parent
|
84 |
86 |
end
|
85 |
87 |
|
86 |
88 |
def test_add_issue_without_overrides_should_ignore_attributes
|
... | ... | |
102 |
104 |
assert_nil issue.fixed_version
|
103 |
105 |
assert_nil issue.estimated_hours
|
104 |
106 |
assert_equal 0, issue.done_ratio
|
|
107 |
assert_nil issue.parent
|
105 |
108 |
end
|
106 |
109 |
|
107 |
110 |
def test_add_issue_to_project_specified_by_subaddress
|
... | ... | |
474 |
477 |
assert_nil issue.start_date
|
475 |
478 |
assert_nil issue.due_date
|
476 |
479 |
assert_equal 0, issue.done_ratio
|
|
480 |
assert_nil issue.parent
|
477 |
481 |
assert_equal 'Normal', issue.priority.to_s
|
478 |
482 |
assert issue.description.include?('Lorem ipsum dolor sit amet, consectetuer adipiscing elit.')
|
479 |
483 |
end
|