@@ -215,7 +215,7 class ChangesetTest < ActiveSupport::TestCase | |||
|
215 | 215 | end |
|
216 | 216 | end |
|
217 | 217 | |
|
218 | def test_update_keywords_with_multiple_rules_should_match_tracker | |
|
218 | def test_update_keywords_with_multiple_rules_for_the_same_keyword_should_match_tracker | |
|
219 | 219 | with_settings :commit_update_keywords => [ |
|
220 | 220 | {'keywords' => 'fixes', 'status_id' => '5', 'if_tracker_id' => '2'}, |
|
221 | 221 | {'keywords' => 'fixes', 'status_id' => '3', 'if_tracker_id' => ''} |
@@ -229,6 +229,24 class ChangesetTest < ActiveSupport::TestCase | |||
|
229 | 229 | end |
|
230 | 230 | end |
|
231 | 231 | |
|
232 | def test_update_keywords_with_multiple_rules_for_the_same_tracker_should_match_keyword | |
|
233 | with_settings :commit_update_keywords => [ | |
|
234 | {'keywords' => 'Fixes, Closes', 'status_id' => '5', 'done_ratio' => '100', 'if_tracker_id' => '2'}, | |
|
235 | {'keywords' => 'Testing', 'status_id' => '3', 'done_ratio' => '90', 'if_tracker_id' => '2'} | |
|
236 | ] do | |
|
237 | ||
|
238 | issue1 = Issue.generate!(:tracker_id => 2) | |
|
239 | issue2 = Issue.generate!(:tracker_id => 2) | |
|
240 | Changeset.generate!(:comments => "Testing ##{issue1.id}, Fixes ##{issue2.id}") | |
|
241 | issue1.reload | |
|
242 | assert_equal 3, issue1.status_id | |
|
243 | assert_equal 90, issue1.done_ratio | |
|
244 | issue2.reload | |
|
245 | assert_equal 5, issue2.status_id | |
|
246 | assert_equal 100, issue2.done_ratio | |
|
247 | end | |
|
248 | end | |
|
249 | ||
|
232 | 250 | def test_update_keywords_with_multiple_rules_and_no_match |
|
233 | 251 | with_settings :commit_update_keywords => [ |
|
234 | 252 | {'keywords' => 'fixes', 'status_id' => '5', 'if_tracker_id' => '2'}, |
General Comments 0
You need to be logged in to leave comments.
Login now