- def test_new_issue_after_login
- # Test creation of a new issue and a new report
-
- # Login
- session[:user] = users(:normal_user).id
-
- get :new, {reportable_id: 1, reportable_type: "DiaryEntry", reported_user_id: 1}
- assert_response :success
- assert_difference "Issue.count",1 do
- details = "Details of a report"
- post :create, { :report => { :deatils => details},
- :issue => { reportable_id: 1, reportable_type: "DiaryEntry", reported_user_id: 1} }
- end