@@ -20,14 +20,16 | |||
|
20 | 20 | require File.expand_path('../../test_helper', __FILE__) |
|
21 | 21 | |
|
22 | 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 | 26 | def setup |
|
26 | 27 | end |
|
27 | 28 | |
|
28 | 29 | def test_ref_keywords_any |
|
29 | 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 | 33 | Setting.commit_fix_done_ratio = '90' |
|
32 | 34 | Setting.commit_ref_keywords = '*' |
|
33 | 35 | Setting.commit_fix_keywords = 'fixes , closes' |
@@ -101,15 +103,18 class ChangesetTest < ActiveSupport::TestCase | |||
|
101 | 103 | assert_equal 1, time.issue_id |
|
102 | 104 | assert_equal 1, time.project_id |
|
103 | 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 | 108 | assert_equal Date.yesterday, time.spent_on |
|
106 | 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 | 112 | end |
|
109 | 113 | end |
|
110 | 114 | |
|
111 | 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 | 118 | Setting.commit_ref_keywords = '*' |
|
114 | 119 | Setting.commit_fix_keywords = 'fixes , closes' |
|
115 | 120 | Setting.commit_logtime_enabled = '1' |
General Comments 0
You need to be logged in to leave comments.
Login now