From 1ef54041da9c33d977c6fb95b2cb0ac0e4ae5519 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 9 Apr 2011 05:40:25 +0000 Subject: [PATCH] scm: code clean up test/unit/changeset_test.rb. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5366 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/changeset_test.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/test/unit/changeset_test.rb b/test/unit/changeset_test.rb index 80fb429a0..0e8c3c2b9 100644 --- a/test/unit/changeset_test.rb +++ b/test/unit/changeset_test.rb @@ -20,14 +20,16 @@ require File.expand_path('../../test_helper', __FILE__) class ChangesetTest < ActiveSupport::TestCase - fixtures :projects, :repositories, :issues, :issue_statuses, :changesets, :changes, :issue_categories, :enumerations, :custom_fields, :custom_values, :users, :members, :member_roles, :trackers + fixtures :projects, :repositories, :issues, :issue_statuses, + :changesets, :changes, :issue_categories, :enumerations, :custom_fields, :custom_values, :users, :members, :member_roles, :trackers def setup end def test_ref_keywords_any ActionMailer::Base.deliveries.clear - Setting.commit_fix_status_id = IssueStatus.find(:first, :conditions => ["is_closed = ?", true]).id + Setting.commit_fix_status_id = IssueStatus.find( + :first, :conditions => ["is_closed = ?", true]).id Setting.commit_fix_done_ratio = '90' Setting.commit_ref_keywords = '*' Setting.commit_fix_keywords = 'fixes , closes' @@ -101,15 +103,18 @@ class ChangesetTest < ActiveSupport::TestCase assert_equal 1, time.issue_id assert_equal 1, time.project_id assert_equal 2, time.user_id - assert_equal expected_hours, time.hours, "@#{syntax} should be logged as #{expected_hours} hours but was #{time.hours}" + assert_equal expected_hours, time.hours, + "@#{syntax} should be logged as #{expected_hours} hours but was #{time.hours}" assert_equal Date.yesterday, time.spent_on assert time.activity.is_default? - assert time.comments.include?('r520'), "r520 was expected in time_entry comments: #{time.comments}" + assert time.comments.include?('r520'), + "r520 was expected in time_entry comments: #{time.comments}" end end def test_ref_keywords_closing_with_timelog - Setting.commit_fix_status_id = IssueStatus.find(:first, :conditions => ["is_closed = ?", true]).id + Setting.commit_fix_status_id = IssueStatus.find( + :first, :conditions => ["is_closed = ?", true]).id Setting.commit_ref_keywords = '*' Setting.commit_fix_keywords = 'fixes , closes' Setting.commit_logtime_enabled = '1' -- 2.39.5