Defect #31021 » 0003-Add-tests.patch
| test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb | ||
|---|---|---|
|
def test_escaping
|
||
|
assert_html_output(
|
||
|
'this is a <script>' => 'this is a <script>'
|
||
|
'this is a <script>' => 'this is a <script>',
|
||
|
'this is a <TEST>' => 'this is a <TEST>',
|
||
|
)
|
||
|
end
|
||
| test/unit/mailer_test.rb | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
def test_issue_add_enclosed_in_lt_and_gt
|
||
|
issue = Issue.find(2)
|
||
|
issue.update(:description => 'aaa<bbb>ccc AAA<BBB>CCC')
|
||
|
assert Mailer.deliver_issue_add(issue)
|
||
|
# text part
|
||
|
assert_mail_body_match 'aaa<bbb>ccc AAA<BBB>CCC', last_email
|
||
|
# html part
|
||
|
assert_select_email do
|
||
|
assert_select 'p', :text => 'aaa<bbb>ccc AAA<BBB>CCC'
|
||
|
end
|
||
|
end
|
||
|
def test_issue_edit_enclosed_in_lt_and_gt
|
||
|
journal = Journal.find(3)
|
||
|
journal.update(:notes => 'ddd<eee>fff DDD<EEE>FFF')
|
||
|
assert Mailer.deliver_issue_edit(journal)
|
||
|
# text part
|
||
|
assert_mail_body_match 'ddd<eee>fff DDD<EEE>FFF', last_email
|
||
|
# html part
|
||
|
assert_select_email do
|
||
|
assert_select 'p', :text => 'ddd<eee>fff DDD<EEE>FFF'
|
||
|
end
|
||
|
end
|
||
|
def test_message_posted_message_id
|
||
|
message = Message.find(1)
|
||
|
Mailer.deliver_message_posted(message)
|
||
- « Previous
- 1
- …
- 3
- 4
- 5
- Next »