18 |
18 |
require File.dirname(__FILE__) + '/../test_helper'
|
19 |
19 |
|
20 |
20 |
class IssueTest < Test::Unit::TestCase
|
21 |
|
fixtures :projects, :users, :members, :trackers, :projects_trackers, :issue_statuses, :issue_categories, :enumerations, :issues, :custom_fields, :custom_values, :time_entries
|
|
21 |
fixtures :projects, :users, :members, :trackers, :projects_trackers, :issue_statuses, :issue_categories, :enumerations, :issues, :custom_fields, :custom_values, :time_entries, :versions
|
22 |
22 |
|
23 |
23 |
def test_category_based_assignment
|
24 |
24 |
issue = Issue.create(:project_id => 1, :tracker_id => 1, :author_id => 3, :status_id => 1, :priority => Enumeration.get_values('IPRI').first, :subject => 'Assignment test', :description => 'Assignment test', :category_id => 1)
|
... | ... | |
70 |
70 |
# Make sure time entries were move to the target project
|
71 |
71 |
assert_equal 2, issue.time_entries.first.project_id
|
72 |
72 |
end
|
|
73 |
|
|
74 |
def test_inherit_version_due_date_if_necessary
|
|
75 |
issue = Issue.find(1)
|
|
76 |
version = Version.find(1)
|
|
77 |
issue.fixed_version = version
|
|
78 |
issue.due_date = nil
|
|
79 |
assert issue.save
|
|
80 |
assert_equal issue.due_date, version.due_date
|
|
81 |
end
|
73 |
82 |
end
|