@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'
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' }
@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
@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
@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&issue%5Bassigned_to_id%5D=2', :text => / me /
end
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'