- def test_new_report
- # Test creation of a new report for an existing issue
- get :new, {reportable_id: 1, reportable_type: "IssueOne", user: 1}
- assert_response :success
- assert_difference "Issue.count",1 do
- details = "Details of a report"
- post :create, { :report => { :details => details},
- :issue => { reportable_id: 1, reportable_type: "IssueOne", user: 1} }
- end