Merged r1451 to r1454, r1458, r1460 to r1463 from trunk.

git-svn-id: http://redmine.rubyforge.org/svn/branches/0.7-stable@1474 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-05-29 18:07:00 +00:00
parent 290bd1756d
commit 2074f0ab41
24 changed files with 1307 additions and 493 deletions
+11
View File
@@ -39,6 +39,17 @@ class ChangesetTest < Test::Unit::TestCase
assert fixed.closed?
assert_equal 90, fixed.done_ratio
end
def test_ref_keywords_any_line_start
Setting.commit_ref_keywords = '*'
c = Changeset.new(:repository => Project.find(1).repository,
:committed_on => Time.now,
:comments => '#1 is the reason of this commit')
c.scan_comment_for_issue_ids
assert_equal [1], c.issue_ids.sort
end
def test_previous
changeset = Changeset.find_by_revision('3')
+3 -1
View File
@@ -58,7 +58,9 @@ class ApplicationHelperTest < HelperTestCase
to_test = {
'This is a "link":http://foo.bar' => 'This is a <a href="http://foo.bar" class="external">link</a>',
'This is an intern "link":/foo/bar' => 'This is an intern <a href="/foo/bar">link</a>',
'"link (Link title)":http://foo.bar' => '<a href="http://foo.bar" title="Link title" class="external">link</a>'
'"link (Link title)":http://foo.bar' => '<a href="http://foo.bar" title="Link title" class="external">link</a>',
# no multiline link text
"This is a double quote \"on the first line\nand another on a second line\":test" => "This is a double quote \"on the first line<br />\nand another on a second line\":test"
}
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
end
+5
View File
@@ -116,6 +116,11 @@ class QueryTest < Test::Unit::TestCase
assert q.has_column?(c)
end
def test_label_for
q = Query.new
assert_equal 'assigned_to', q.label_for('assigned_to_id')
end
def test_editable_by
admin = User.find(1)
manager = User.find(2)