start of iteration 2
Some checks failed
/ Run tests (push) Failing after 1m19s
/ Run system tests (push) Failing after 1m18s
/ Build, push and deploy image (push) Has been skipped

This commit is contained in:
david 2024-10-31 23:13:18 +01:00
parent 9fb87a74ce
commit 729ed13521
75 changed files with 705 additions and 170 deletions

View file

@ -0,0 +1,48 @@
require "test_helper"
class PagesControllerTest < ActionDispatch::IntegrationTest
setup do
@page = pages(:one)
end
test "should get index" do
get pages_url
assert_response :success
end
test "should get new" do
get new_page_url
assert_response :success
end
test "should create page" do
assert_difference("Page.count") do
post pages_url, params: { page: { path: @page.path, position: @page.position, report_id: @page.report_id, url: @page.url } }
end
assert_redirected_to page_url(Page.last)
end
test "should show page" do
get page_url(@page)
assert_response :success
end
test "should get edit" do
get edit_page_url(@page)
assert_response :success
end
test "should update page" do
patch page_url(@page), params: { page: { path: @page.path, position: @page.position, report_id: @page.report_id, url: @page.url } }
assert_redirected_to page_url(@page)
end
test "should destroy page" do
assert_difference("Page.count", -1) do
delete page_url(@page)
end
assert_redirected_to pages_url
end
end

View file

@ -35,7 +35,7 @@ class ReportsControllerTest < ActionDispatch::IntegrationTest
test "should create report" do
assert_difference("Report.count") do
post reports_url, params: { report: { comment_html: @report.comment_html, name: @report.name } }
post reports_url, params: { report: { comment: @report.comment, name: @report.name } }
end
assert_redirected_to report_url(Report.last)
@ -52,7 +52,7 @@ class ReportsControllerTest < ActionDispatch::IntegrationTest
end
test "should update report" do
patch report_url(@report), params: { report: { comment_html: @report.comment_html, name: @report.name } }
patch report_url(@report), params: { report: { comment: @report.comment, name: @report.name } }
assert_redirected_to report_url(@report)
end

View file

@ -36,7 +36,7 @@ class SuccessCriteriaControllerTest < ActionDispatch::IntegrationTest
test "should create success_criterion" do
assert_difference("SuccessCriterion.count") do
post success_criteria_url,
params: { success_criterion: { comment_html: @success_criterion.comment_html,
params: { success_criterion: { comment: @success_criterion.comment,
description_html: @success_criterion.description_html, element_id: @success_criterion.element_id, level: @success_criterion.level, result: @success_criterion.result, title: @success_criterion.title } }
end
@ -55,7 +55,7 @@ class SuccessCriteriaControllerTest < ActionDispatch::IntegrationTest
test "should update success_criterion" do
patch success_criterion_url(@success_criterion),
params: { success_criterion: { comment_html: @success_criterion.comment_html,
params: { success_criterion: { comment: @success_criterion.comment,
description_html: @success_criterion.description_html, element_id: @success_criterion.element_id, level: @success_criterion.level, result: @success_criterion.result, title: @success_criterion.title } }
assert_redirected_to success_criterion_url(@success_criterion)
end