mirror of
https://github.com/redmine/redmine.git
synced 2025-11-12 00:06:01 +01:00
fix source indent of PreviewsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@20296 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -32,21 +32,27 @@ class PreviewsControllerTest < Redmine::ControllerTest
|
|||||||
|
|
||||||
def test_preview_new_issue_description
|
def test_preview_new_issue_description
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
post :issue, :params => {
|
post(
|
||||||
|
:issue,
|
||||||
|
:params => {
|
||||||
:project_id => '1',
|
:project_id => '1',
|
||||||
:text => 'Foo'
|
:text => 'Foo'
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_select 'p', :text => 'Foo'
|
assert_select 'p', :text => 'Foo'
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_preview_issue_description
|
def test_preview_issue_description
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
post :issue, :params => {
|
post(
|
||||||
|
:issue,
|
||||||
|
:params => {
|
||||||
:project_id => '1',
|
:project_id => '1',
|
||||||
:issue_id => 1,
|
:issue_id => 1,
|
||||||
:text => 'Unable to print recipes'
|
:text => 'Unable to print recipes'
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|
||||||
assert_select 'p', :text => 'Unable to print recipes'
|
assert_select 'p', :text => 'Unable to print recipes'
|
||||||
@@ -54,11 +60,14 @@ class PreviewsControllerTest < Redmine::ControllerTest
|
|||||||
|
|
||||||
def test_preview_issue_notes
|
def test_preview_issue_notes
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
post :issue, :params => {
|
post(
|
||||||
|
:issue,
|
||||||
|
:params => {
|
||||||
:project_id => '1',
|
:project_id => '1',
|
||||||
:id => 1,
|
:id => 1,
|
||||||
:text => 'Foo'
|
:text => 'Foo'
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_select 'p', :text => 'Foo'
|
assert_select 'p', :text => 'Foo'
|
||||||
end
|
end
|
||||||
@@ -66,31 +75,40 @@ class PreviewsControllerTest < Redmine::ControllerTest
|
|||||||
def test_preview_issue_notes_should_support_links_to_existing_attachments
|
def test_preview_issue_notes_should_support_links_to_existing_attachments
|
||||||
Attachment.generate!(:container => Issue.find(1), :filename => 'foo.bar')
|
Attachment.generate!(:container => Issue.find(1), :filename => 'foo.bar')
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
post :issue, :params => {
|
post(
|
||||||
|
:issue,
|
||||||
|
:params => {
|
||||||
:project_id => '1',
|
:project_id => '1',
|
||||||
:issue_id => 1,
|
:issue_id => 1,
|
||||||
:field => 'notes',
|
:field => 'notes',
|
||||||
:text => 'attachment:foo.bar'
|
:text => 'attachment:foo.bar'
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_select 'a.attachment', :text => 'foo.bar'
|
assert_select 'a.attachment', :text => 'foo.bar'
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_preview_new_news
|
def test_preview_new_news
|
||||||
get :news, :params => {
|
get(
|
||||||
|
:news,
|
||||||
|
:params => {
|
||||||
:project_id => 1,
|
:project_id => 1,
|
||||||
:text => 'News description',
|
:text => 'News description',
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_select 'p', :text => /News description/
|
assert_select 'p', :text => /News description/
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_preview_existing_news
|
def test_preview_existing_news
|
||||||
get :news, :params => {
|
get(
|
||||||
|
:news,
|
||||||
|
:params => {
|
||||||
:project_id => 1,
|
:project_id => 1,
|
||||||
:id => 2,
|
:id => 2,
|
||||||
:text => 'News description'
|
:text => 'News description'
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_select 'p', :text => /News description/
|
assert_select 'p', :text => /News description/
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user