Rails4: fix PreviewsControllerTest assert_template failures

<pre>
  1) Failure:
PreviewsControllerTest#test_preview_issue_notes [test/functional/previews_controller_test.rb:44]:
expecting <"preview"> but rendering with <["previews/issue"]>
</pre>

git-svn-id: http://svn.redmine.org/redmine/trunk@12879 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-02-13 08:17:04 +00:00
parent 22c7e0b8df
commit 49e0489bc8
1 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ class PreviewsControllerTest < ActionController::TestCase
@request.session[:user_id] = 2 @request.session[:user_id] = 2
post :issue, :project_id => '1', :issue => {:description => 'Foo'} post :issue, :project_id => '1', :issue => {:description => 'Foo'}
assert_response :success assert_response :success
assert_template 'preview' assert_template 'previews/issue'
assert_not_nil assigns(:description) assert_not_nil assigns(:description)
end end
@ -41,7 +41,7 @@ class PreviewsControllerTest < ActionController::TestCase
post :issue, :project_id => '1', :id => 1, post :issue, :project_id => '1', :id => 1,
:issue => {:description => Issue.find(1).description, :notes => 'Foo'} :issue => {:description => Issue.find(1).description, :notes => 'Foo'}
assert_response :success assert_response :success
assert_template 'preview' assert_template 'previews/issue'
assert_not_nil assigns(:notes) assert_not_nil assigns(:notes)
end end
@ -49,7 +49,7 @@ class PreviewsControllerTest < ActionController::TestCase
@request.session[:user_id] = 2 @request.session[:user_id] = 2
post :issue, :project_id => '1', :id => 1, :notes => 'Foo' post :issue, :project_id => '1', :id => 1, :notes => 'Foo'
assert_response :success assert_response :success
assert_template 'preview' assert_template 'previews/issue'
assert_not_nil assigns(:notes) assert_not_nil assigns(:notes)
assert_tag :p, :content => 'Foo' assert_tag :p, :content => 'Foo'
end end