+ get :show, :params => { :id => issue.id }
+ assert_response :redirect
+ assert_redirected_to :controller => :errors, :action => :forbidden
+
+ # Access issue as administrator
+ session[:user] = create(:administrator_user).id
+ get :show, :params => { :id => issue.id }
+ assert_response :success
+
+ # Access issue as moderator
+ session[:user] = create(:moderator_user).id
+ get :show, :params => { :id => issue.id }
+ assert_response :success
+ end
+
+ def test_resolve
+ target_user = create(:user)
+ issue = create(:issue, :reportable => target_user, :reported_user => target_user)
+
+ # Resolve issue without login
+ get :resolve, :params => { :id => issue.id }
+ assert_response :redirect
+ assert_redirected_to login_path(:referer => resolve_issue_path(issue))