mirror of
https://github.com/redmine/redmine.git
synced 2026-03-06 12:31:40 +01:00
Explicitly specify text formatting in the tests (#35952).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@21386 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1701,31 +1701,33 @@ class IssuesControllerTest < Redmine::ControllerTest
|
||||
end
|
||||
|
||||
def test_index_with_last_notes_column
|
||||
get(
|
||||
:index,
|
||||
:params => {
|
||||
:set_filter => 1,
|
||||
:c => %w(subject last_notes)
|
||||
}
|
||||
)
|
||||
assert_response :success
|
||||
assert_select 'table.issues thead th', 4 # columns: chekbox + id + subject
|
||||
with_settings :text_formatting => 'textile' do
|
||||
get(
|
||||
:index,
|
||||
:params => {
|
||||
:set_filter => 1,
|
||||
:c => %w(subject last_notes)
|
||||
}
|
||||
)
|
||||
assert_response :success
|
||||
assert_select 'table.issues thead th', 4 # columns: chekbox + id + subject
|
||||
|
||||
assert_select 'td.last_notes[colspan="4"]', :text => 'Some notes with Redmine links: #2, r2.'
|
||||
assert_select(
|
||||
'td.last_notes[colspan="4"]',
|
||||
:text => 'A comment with inline image: and a reference to #1 and r2.'
|
||||
)
|
||||
get(
|
||||
:index,
|
||||
:params => {
|
||||
:set_filter => 1,
|
||||
:c => %w(subject last_notes),
|
||||
:format => 'pdf'
|
||||
}
|
||||
)
|
||||
assert_response :success
|
||||
assert_equal 'application/pdf', response.media_type
|
||||
assert_select 'td.last_notes[colspan="4"]', :text => 'Some notes with Redmine links: #2, r2.'
|
||||
assert_select(
|
||||
'td.last_notes[colspan="4"]',
|
||||
:text => 'A comment with inline image: and a reference to #1 and r2.'
|
||||
)
|
||||
get(
|
||||
:index,
|
||||
:params => {
|
||||
:set_filter => 1,
|
||||
:c => %w(subject last_notes),
|
||||
:format => 'pdf'
|
||||
}
|
||||
)
|
||||
assert_response :success
|
||||
assert_equal 'application/pdf', response.media_type
|
||||
end
|
||||
end
|
||||
|
||||
def test_index_with_last_notes_column_should_display_private_notes_with_permission_only
|
||||
@@ -2893,20 +2895,22 @@ class IssuesControllerTest < Redmine::ControllerTest
|
||||
end
|
||||
|
||||
def test_show_atom
|
||||
get(
|
||||
:show,
|
||||
:params => {
|
||||
:id => 2,
|
||||
:format => 'atom'
|
||||
}
|
||||
)
|
||||
assert_response :success
|
||||
assert_equal 'application/atom+xml', response.media_type
|
||||
# Inline image
|
||||
assert_select(
|
||||
'content',
|
||||
:text => Regexp.new(Regexp.quote('http://test.host/attachments/download/10'))
|
||||
)
|
||||
with_settings :text_formatting => 'textile' do
|
||||
get(
|
||||
:show,
|
||||
:params => {
|
||||
:id => 2,
|
||||
:format => 'atom'
|
||||
}
|
||||
)
|
||||
assert_response :success
|
||||
assert_equal 'application/atom+xml', response.media_type
|
||||
# Inline image
|
||||
assert_select(
|
||||
'content',
|
||||
:text => Regexp.new(Regexp.quote('http://test.host/attachments/download/10'))
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def test_show_export_to_pdf
|
||||
|
||||
Reference in New Issue
Block a user