before_filter :find_journal, :only => [:edit]
before_filter :find_issue, :only => [:new]
before_filter :find_optional_project, :only => [:index]
+ before_filter :authorize, :only => [:new, :edit]
accept_key_auth :index
helper :issues
def test_reply_to_issue
@request.session[:user_id] = 2
- get :new, :id => 1
+ get :new, :id => 6
assert_response :success
assert_select_rjs :show, "update"
end
+
+ def test_reply_to_issue_without_permission
+ @request.session[:user_id] = 7
+ get :new, :id => 6
+ assert_response 403
+ end
def test_reply_to_note
@request.session[:user_id] = 2
- get :new, :id => 1, :journal_id => 2
+ get :new, :id => 6, :journal_id => 4
assert_response :success
assert_select_rjs :show, "update"
end