Merged r2109, r2118, r2130, r2131, r2134, r2135, r2136 and r2139 to r2145 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2146 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -70,6 +70,8 @@ class ApplicationHelperTest < HelperTestCase
|
||||
'floating !>http://foo.bar/image.jpg!' => 'floating <div style="float:right"><img src="http://foo.bar/image.jpg" alt="" /></div>',
|
||||
'with class !(some-class)http://foo.bar/image.jpg!' => 'with class <img src="http://foo.bar/image.jpg" class="some-class" alt="" />',
|
||||
'with style !{width:100px;height100px}http://foo.bar/image.jpg!' => 'with style <img src="http://foo.bar/image.jpg" style="width:100px;height100px;" alt="" />',
|
||||
'with title !http://foo.bar/image.jpg(This is a title)!' => 'with title <img src="http://foo.bar/image.jpg" title="This is a title" alt="This is a title" />',
|
||||
'with title !http://foo.bar/image.jpg(This is a double-quoted "title")!' => 'with title <img src="http://foo.bar/image.jpg" title="This is a double-quoted "title"" alt="This is a double-quoted "title"" />',
|
||||
}
|
||||
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
|
||||
end
|
||||
|
||||
@@ -190,4 +190,11 @@ class IssueTest < Test::Unit::TestCase
|
||||
assert_nil Issue.find_by_id(1)
|
||||
assert_nil TimeEntry.find_by_issue_id(1)
|
||||
end
|
||||
|
||||
def test_overdue
|
||||
assert Issue.new(:due_date => 1.day.ago.to_date).overdue?
|
||||
assert !Issue.new(:due_date => Date.today).overdue?
|
||||
assert !Issue.new(:due_date => 1.day.from_now.to_date).overdue?
|
||||
assert !Issue.new(:due_date => nil).overdue?
|
||||
end
|
||||
end
|
||||
|
||||
@@ -129,6 +129,15 @@ class MailHandlerTest < Test::Unit::TestCase
|
||||
assert_match /This is reply/, journal.notes
|
||||
assert_equal IssueStatus.find_by_name("Resolved"), issue.status
|
||||
end
|
||||
|
||||
def test_should_strip_tags_of_html_only_emails
|
||||
issue = submit_email('ticket_html_only.eml', :issue => {:project => 'ecookbook'})
|
||||
assert issue.is_a?(Issue)
|
||||
assert !issue.new_record?
|
||||
issue.reload
|
||||
assert_equal 'HTML email', issue.subject
|
||||
assert_equal 'This is a html-only email.', issue.description
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
||||
@@ -53,6 +53,12 @@ class RepositoryCvsTest < Test::Unit::TestCase
|
||||
@repository.fetch_changesets
|
||||
assert_equal 5, @repository.changesets.count
|
||||
end
|
||||
|
||||
def test_deleted_files_should_not_be_listed
|
||||
entries = @repository.entries('sources')
|
||||
assert entries.detect {|e| e.name == 'watchers_controller.rb'}
|
||||
assert_nil entries.detect {|e| e.name == 'welcome_controller.rb'}
|
||||
end
|
||||
else
|
||||
puts "CVS test repository NOT FOUND. Skipping unit tests !!!"
|
||||
def test_fake; assert true end
|
||||
|
||||
Reference in New Issue
Block a user