Added projects
This commit is contained in:
parent
0964187f22
commit
8b4ffb83ec
37 changed files with 470 additions and 1935 deletions
|
|
@ -14,18 +14,18 @@ class ReportsControllerTest < ::ControllerTest
|
|||
end
|
||||
|
||||
test "should get index" do
|
||||
get reports_url
|
||||
get project_reports_url(@report.project)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get new_report_url
|
||||
get new_project_report_url(@report.project)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should create report" do
|
||||
assert_difference("Report.count") do
|
||||
post reports_url, params: { report: { comment: @report.comment, name: @report.name } }
|
||||
post project_reports_url(@report.project), params: { report: { comment: @report.comment, name: @report.name } }
|
||||
end
|
||||
|
||||
assert_redirected_to report_url(Report.last)
|
||||
|
|
@ -51,6 +51,6 @@ class ReportsControllerTest < ::ControllerTest
|
|||
delete report_url(@report)
|
||||
end
|
||||
|
||||
assert_redirected_to reports_url
|
||||
assert_redirected_to project_url(@report.project)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue