Rails4: fix "assert_template 'context_menu'" fails at ContextMenusControllerTest

git-svn-id: http://svn.redmine.org/redmine/trunk@12798 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-02-04 23:50:49 +00:00
parent 09bbfad124
commit 035c1b9a18
1 changed files with 6 additions and 6 deletions

View File

@ -37,7 +37,7 @@ class ContextMenusControllerTest < ActionController::TestCase
@request.session[:user_id] = 2
get :issues, :ids => [1]
assert_response :success
assert_template 'context_menu'
assert_template 'context_menus/issues'
assert_select 'a.icon-edit[href=?]', '/issues/1/edit', :text => 'Edit'
assert_select 'a.icon-copy[href=?]', '/projects/ecookbook/issues/1/copy', :text => 'Copy'
@ -58,7 +58,7 @@ class ContextMenusControllerTest < ActionController::TestCase
def test_context_menu_one_issue_by_anonymous
get :issues, :ids => [1]
assert_response :success
assert_template 'context_menu'
assert_template 'context_menus/issues'
assert_tag :tag => 'a', :content => 'Delete',
:attributes => { :href => '#',
:class => 'icon-del disabled' }
@ -68,7 +68,7 @@ class ContextMenusControllerTest < ActionController::TestCase
@request.session[:user_id] = 2
get :issues, :ids => [1, 2]
assert_response :success
assert_template 'context_menu'
assert_template 'context_menus/issues'
assert_not_nil assigns(:issues)
assert_equal [1, 2], assigns(:issues).map(&:id).sort
@ -87,7 +87,7 @@ class ContextMenusControllerTest < ActionController::TestCase
@request.session[:user_id] = 2
get :issues, :ids => [1, 2, 6]
assert_response :success
assert_template 'context_menu'
assert_template 'context_menus/issues'
assert_not_nil assigns(:issues)
assert_equal [1, 2, 6], assigns(:issues).map(&:id).sort
@ -202,7 +202,7 @@ class ContextMenusControllerTest < ActionController::TestCase
@request.session[:user_id] = 2
get :issues, :ids => [1]
assert_response :success
assert_template 'context_menu'
assert_template 'context_menus/issues'
assert_select 'a[href=?]', '/issues/bulk_update?ids%5B%5D=1&amp;issue%5Bassigned_to_id%5D=2', :text => / me /
end
@ -213,7 +213,7 @@ class ContextMenusControllerTest < ActionController::TestCase
get :issues, :ids => [1, 4]
assert_response :success
assert_template 'context_menu'
assert_template 'context_menus/issues'
assert_include version, assigns(:versions)
assert_select 'a', :text => 'eCookbook - Shared'