@@ -1,18 +1,18 | |||||
1 | # encoding: utf-8 |
|
1 | # encoding: utf-8 | |
2 | # |
|
2 | # | |
3 | # Redmine - project management software |
|
3 | # Redmine - project management software | |
4 |
# Copyright (C) 2006-201 |
|
4 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
5 | # |
|
5 | # | |
6 | # This program is free software; you can redistribute it and/or |
|
6 | # This program is free software; you can redistribute it and/or | |
7 | # modify it under the terms of the GNU General Public License |
|
7 | # modify it under the terms of the GNU General Public License | |
8 | # as published by the Free Software Foundation; either version 2 |
|
8 | # as published by the Free Software Foundation; either version 2 | |
9 | # of the License, or (at your option) any later version. |
|
9 | # of the License, or (at your option) any later version. | |
10 |
# |
|
10 | # | |
11 | # This program is distributed in the hope that it will be useful, |
|
11 | # This program is distributed in the hope that it will be useful, | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. |
|
14 | # GNU General Public License for more details. | |
15 |
# |
|
15 | # | |
16 | # You should have received a copy of the GNU General Public License |
|
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with this program; if not, write to the Free Software |
|
17 | # along with this program; if not, write to the Free Software | |
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
@@ -22,7 +22,7 require File.expand_path('../../test_helper', __FILE__) | |||||
22 | class ChangesetTest < ActiveSupport::TestCase |
|
22 | class ChangesetTest < ActiveSupport::TestCase | |
23 | fixtures :projects, :repositories, |
|
23 | fixtures :projects, :repositories, | |
24 | :issues, :issue_statuses, :issue_categories, |
|
24 | :issues, :issue_statuses, :issue_categories, | |
25 |
:changesets, :changes, |
|
25 | :changesets, :changes, | |
26 | :enumerations, |
|
26 | :enumerations, | |
27 | :custom_fields, :custom_values, |
|
27 | :custom_fields, :custom_values, | |
28 | :users, :members, :member_roles, :trackers, |
|
28 | :users, :members, :member_roles, :trackers, | |
@@ -59,14 +59,14 class ChangesetTest < ActiveSupport::TestCase | |||||
59 | :committed_on => Time.now, |
|
59 | :committed_on => Time.now, | |
60 | :comments => 'Ignores #2. Refs #1') |
|
60 | :comments => 'Ignores #2. Refs #1') | |
61 | c.scan_comment_for_issue_ids |
|
61 | c.scan_comment_for_issue_ids | |
62 |
|
62 | |||
63 | assert_equal [1], c.issue_ids.sort |
|
63 | assert_equal [1], c.issue_ids.sort | |
64 | end |
|
64 | end | |
65 |
|
65 | |||
66 | def test_ref_keywords_any_only |
|
66 | def test_ref_keywords_any_only | |
67 | Setting.commit_ref_keywords = '*' |
|
67 | Setting.commit_ref_keywords = '*' | |
68 | Setting.commit_fix_keywords = '' |
|
68 | Setting.commit_fix_keywords = '' | |
69 |
|
69 | |||
70 | c = Changeset.new(:repository => Project.find(1).repository, |
|
70 | c = Changeset.new(:repository => Project.find(1).repository, | |
71 | :committed_on => Time.now, |
|
71 | :committed_on => Time.now, | |
72 | :comments => 'Ignores #2. Refs #1') |
|
72 | :comments => 'Ignores #2. Refs #1') | |
@@ -123,7 +123,7 class ChangesetTest < ActiveSupport::TestCase | |||||
123 | Setting.commit_ref_keywords = '*' |
|
123 | Setting.commit_ref_keywords = '*' | |
124 | Setting.commit_fix_keywords = 'fixes , closes' |
|
124 | Setting.commit_fix_keywords = 'fixes , closes' | |
125 | Setting.commit_logtime_enabled = '1' |
|
125 | Setting.commit_logtime_enabled = '1' | |
126 |
|
126 | |||
127 | c = Changeset.new(:repository => Project.find(1).repository, |
|
127 | c = Changeset.new(:repository => Project.find(1).repository, | |
128 | :committed_on => Time.now, |
|
128 | :committed_on => Time.now, | |
129 | :comments => 'This is a comment. Fixes #1 @4.5, #2 @1', |
|
129 | :comments => 'This is a comment. Fixes #1 @4.5, #2 @1', |
General Comments 0
You need to be logged in to leave comments.
Login now