summaryrefslogtreecommitdiffstats
path: root/test/unit/repository_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-02 23:07:38 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-02 23:07:38 +0000
commit18d0618007b556b64ba4772738fe7d5fb27c082b (patch)
treea7f14d79282bcaa6427eee982bfa185ebc0dec59 /test/unit/repository_test.rb
parent0a132e48f9d270aa011f1040d8a4dd136a61d13e (diff)
downloadredmine-18d0618007b556b64ba4772738fe7d5fb27c082b.tar.gz
redmine-18d0618007b556b64ba4772738fe7d5fb27c082b.zip
scm: space cleanup in unit repository test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5615 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_test.rb')
-rw-r--r--test/unit/repository_test.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb
index caf89b484..55690a884 100644
--- a/test/unit/repository_test.rb
+++ b/test/unit/repository_test.rb
@@ -45,7 +45,7 @@ class RepositoryTest < ActiveSupport::TestCase
repository.url = "svn://localhost"
assert repository.save
repository.reload
-
+
project = Project.find(3)
assert_equal repository, project.repository
end
@@ -72,7 +72,7 @@ class RepositoryTest < ActiveSupport::TestCase
def test_scan_changesets_for_issue_ids
Setting.default_language = 'en'
Setting.notified_events = ['issue_added','issue_updated']
-
+
# choosing a status to apply to fix issues
Setting.commit_fix_status_id = IssueStatus.find(:first, :conditions => ["is_closed = ?", true]).id
Setting.commit_fix_done_ratio = "90"
@@ -80,33 +80,33 @@ class RepositoryTest < ActiveSupport::TestCase
Setting.commit_fix_keywords = 'fixes , closes'
Setting.default_language = 'en'
ActionMailer::Base.deliveries.clear
-
+
# make sure issue 1 is not already closed
fixed_issue = Issue.find(1)
assert !fixed_issue.status.is_closed?
old_status = fixed_issue.status
-
+
Repository.scan_changesets_for_issue_ids
assert_equal [101, 102], Issue.find(3).changeset_ids
-
+
# fixed issues
fixed_issue.reload
assert fixed_issue.status.is_closed?
assert_equal 90, fixed_issue.done_ratio
assert_equal [101], fixed_issue.changeset_ids
-
+
# issue change
journal = fixed_issue.journals.find(:first, :order => 'created_on desc')
assert_equal User.find_by_login('dlopper'), journal.user
assert_equal 'Applied in changeset r2.', journal.notes
-
+
# 2 email notifications
assert_equal 2, ActionMailer::Base.deliveries.size
mail = ActionMailer::Base.deliveries.first
assert_kind_of TMail::Mail, mail
assert mail.subject.starts_with?("[#{fixed_issue.project.name} - #{fixed_issue.tracker.name} ##{fixed_issue.id}]")
assert mail.body.include?("Status changed from #{old_status} to #{fixed_issue.status}")
-
+
# ignoring commits referencing an issue of another project
assert_equal [], Issue.find(4).changesets
end