@@ -20,14 +20,16 | |||||
20 | require File.expand_path('../../test_helper', __FILE__) |
|
20 | require File.expand_path('../../test_helper', __FILE__) | |
21 |
|
21 | |||
22 | class ChangesetTest < ActiveSupport::TestCase |
|
22 | class ChangesetTest < ActiveSupport::TestCase | |
23 | fixtures :projects, :repositories, :issues, :issue_statuses, :changesets, :changes, :issue_categories, :enumerations, :custom_fields, :custom_values, :users, :members, :member_roles, :trackers |
|
23 | fixtures :projects, :repositories, :issues, :issue_statuses, | |
|
24 | :changesets, :changes, :issue_categories, :enumerations, :custom_fields, :custom_values, :users, :members, :member_roles, :trackers | |||
24 |
|
25 | |||
25 | def setup |
|
26 | def setup | |
26 | end |
|
27 | end | |
27 |
|
28 | |||
28 | def test_ref_keywords_any |
|
29 | def test_ref_keywords_any | |
29 | ActionMailer::Base.deliveries.clear |
|
30 | ActionMailer::Base.deliveries.clear | |
30 |
Setting.commit_fix_status_id = IssueStatus.find( |
|
31 | Setting.commit_fix_status_id = IssueStatus.find( | |
|
32 | :first, :conditions => ["is_closed = ?", true]).id | |||
31 | Setting.commit_fix_done_ratio = '90' |
|
33 | Setting.commit_fix_done_ratio = '90' | |
32 | Setting.commit_ref_keywords = '*' |
|
34 | Setting.commit_ref_keywords = '*' | |
33 | Setting.commit_fix_keywords = 'fixes , closes' |
|
35 | Setting.commit_fix_keywords = 'fixes , closes' | |
@@ -101,15 +103,18 class ChangesetTest < ActiveSupport::TestCase | |||||
101 | assert_equal 1, time.issue_id |
|
103 | assert_equal 1, time.issue_id | |
102 | assert_equal 1, time.project_id |
|
104 | assert_equal 1, time.project_id | |
103 | assert_equal 2, time.user_id |
|
105 | assert_equal 2, time.user_id | |
104 | assert_equal expected_hours, time.hours, "@#{syntax} should be logged as #{expected_hours} hours but was #{time.hours}" |
|
106 | assert_equal expected_hours, time.hours, | |
|
107 | "@#{syntax} should be logged as #{expected_hours} hours but was #{time.hours}" | |||
105 | assert_equal Date.yesterday, time.spent_on |
|
108 | assert_equal Date.yesterday, time.spent_on | |
106 | assert time.activity.is_default? |
|
109 | assert time.activity.is_default? | |
107 | assert time.comments.include?('r520'), "r520 was expected in time_entry comments: #{time.comments}" |
|
110 | assert time.comments.include?('r520'), | |
|
111 | "r520 was expected in time_entry comments: #{time.comments}" | |||
108 | end |
|
112 | end | |
109 | end |
|
113 | end | |
110 |
|
114 | |||
111 | def test_ref_keywords_closing_with_timelog |
|
115 | def test_ref_keywords_closing_with_timelog | |
112 |
Setting.commit_fix_status_id = IssueStatus.find( |
|
116 | Setting.commit_fix_status_id = IssueStatus.find( | |
|
117 | :first, :conditions => ["is_closed = ?", true]).id | |||
113 | Setting.commit_ref_keywords = '*' |
|
118 | Setting.commit_ref_keywords = '*' | |
114 | Setting.commit_fix_keywords = 'fixes , closes' |
|
119 | Setting.commit_fix_keywords = 'fixes , closes' | |
115 | Setting.commit_logtime_enabled = '1' |
|
120 | Setting.commit_logtime_enabled = '1' |
General Comments 0
You need to be logged in to leave comments.
Login now