A lot :)
This commit is contained in:
parent
aad67af0d1
commit
63fc206c27
153 changed files with 2043 additions and 646 deletions
|
|
@ -1,8 +1,12 @@
|
|||
require 'test_helper'
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Admin::BackupsControllerTest < ActionDispatch::IntegrationTest
|
||||
test 'should show admin_backup' do
|
||||
get admin_backup_url(@admin_backup)
|
||||
assert_response :success
|
||||
require "test_helper"
|
||||
|
||||
module Admin
|
||||
class BackupsControllerTest < ActionDispatch::IntegrationTest
|
||||
test "should show admin_backup" do
|
||||
get admin_backup_url(@admin_backup)
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,22 +1,24 @@
|
|||
require 'test_helper'
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class ChecklistEntriesControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
@checklist_entry = checklist_entries(:one)
|
||||
end
|
||||
|
||||
test 'should get index' do
|
||||
test "should get index" do
|
||||
get checklist_entries_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should get new' do
|
||||
test "should get new" do
|
||||
get new_checklist_entry_url(checklist_id: @checklist_entry.checklist_id)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should create checklist_entry' do
|
||||
assert_difference('ChecklistEntry.count') do
|
||||
test "should create checklist_entry" do
|
||||
assert_difference("ChecklistEntry.count") do
|
||||
post checklist_entries_url,
|
||||
params: { checklist_entry: { check_id: @checklist_entry.check_id, checklist_id: @checklist_entry.checklist_id,
|
||||
position: @checklist_entry.position } }
|
||||
|
|
@ -25,25 +27,25 @@ class ChecklistEntriesControllerTest < ActionDispatch::IntegrationTest
|
|||
assert_redirected_to checklist_url(ChecklistEntry.last.checklist)
|
||||
end
|
||||
|
||||
test 'should show checklist_entry' do
|
||||
test "should show checklist_entry" do
|
||||
get checklist_entry_url(@checklist_entry)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should get edit' do
|
||||
test "should get edit" do
|
||||
get edit_checklist_entry_url(@checklist_entry)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should update checklist_entry' do
|
||||
test "should update checklist_entry" do
|
||||
patch checklist_entry_url(@checklist_entry),
|
||||
params: { checklist_entry: { check_id: @checklist_entry.check_id, checklist_id: @checklist_entry.checklist_id,
|
||||
position: @checklist_entry.position } }
|
||||
assert_redirected_to checklist_url(@checklist_entry.checklist)
|
||||
end
|
||||
|
||||
test 'should destroy checklist_entry' do
|
||||
assert_difference('ChecklistEntry.count', -1) do
|
||||
test "should destroy checklist_entry" do
|
||||
assert_difference("ChecklistEntry.count", -1) do
|
||||
delete checklist_entry_url(@checklist_entry)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class ChecklistsControllerTest < ActionDispatch::IntegrationTest
|
||||
|
|
@ -17,7 +19,9 @@ class ChecklistsControllerTest < ActionDispatch::IntegrationTest
|
|||
|
||||
test "should create checklist" do
|
||||
assert_difference("Checklist.count") do
|
||||
post checklists_url, params: { checklist: { code: @checklist.code, description_html: @checklist.description_html, name: @checklist.name } }
|
||||
post checklists_url,
|
||||
params: { checklist: { code: @checklist.code, description_html: @checklist.description_html,
|
||||
name: @checklist.name } }
|
||||
end
|
||||
|
||||
assert_redirected_to checklist_url(Checklist.last)
|
||||
|
|
@ -34,7 +38,9 @@ class ChecklistsControllerTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
test "should update checklist" do
|
||||
patch checklist_url(@checklist), params: { checklist: { code: @checklist.code, description_html: @checklist.description_html, name: @checklist.name } }
|
||||
patch checklist_url(@checklist),
|
||||
params: { checklist: { code: @checklist.code, description_html: @checklist.description_html,
|
||||
name: @checklist.name } }
|
||||
assert_redirected_to checklist_url(@checklist)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,49 +1,52 @@
|
|||
require 'test_helper'
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class ChecksControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
@principle = principles(:one)
|
||||
@check = checks(:deletable)
|
||||
end
|
||||
|
||||
test 'should get index' do
|
||||
test "should get index" do
|
||||
get checks_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should get new' do
|
||||
test "should get new" do
|
||||
get new_check_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should create check' do
|
||||
assert_difference('Check.count') do
|
||||
test "should create check" do
|
||||
assert_difference("Check.count") do
|
||||
post checks_url,
|
||||
params: { check: { level: @check.level, name: @check.name, position: @check.position,
|
||||
success_criterion_html: @check.success_criterion_html } }
|
||||
params: { check: { principle_id: @principle.id, level: @check.level, name_de: @check.name_de, position: @check.position,
|
||||
criterion_de: @check.criterion_de } }
|
||||
end
|
||||
|
||||
assert_redirected_to check_url(Check.last)
|
||||
end
|
||||
|
||||
test 'should show check' do
|
||||
test "should show check" do
|
||||
get check_url(@check)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should get edit' do
|
||||
test "should get edit" do
|
||||
get edit_check_url(@check)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should update check' do
|
||||
test "should update check" do
|
||||
patch check_url(@check),
|
||||
params: { check: { level: @check.level, name: @check.name, position: @check.position,
|
||||
success_criterion_html: @check.success_criterion_html } }
|
||||
params: { check: { principle_id: @principle.id, level: @check.level, name_de: @check.t_name, position: @check.position,
|
||||
criterion_de: @check.criterion_de } }
|
||||
assert_redirected_to check_url(@check)
|
||||
end
|
||||
|
||||
test 'should destroy check' do
|
||||
assert_difference('Check.count', -1) do
|
||||
test "should destroy check" do
|
||||
assert_difference("Check.count", -1) do
|
||||
delete check_url(@check)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
require 'test_helper'
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class ElementsControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
|
|
@ -6,18 +8,18 @@ class ElementsControllerTest < ActionDispatch::IntegrationTest
|
|||
@checklist = checklists(:one)
|
||||
end
|
||||
|
||||
test 'should get index' do
|
||||
test "should get index" do
|
||||
get elements_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should get new' do
|
||||
test "should get new" do
|
||||
get new_element_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should create element' do
|
||||
assert_difference('Element.count') do
|
||||
test "should create element" do
|
||||
assert_difference("Element.count") do
|
||||
post elements_url,
|
||||
params: { element: { description_html: @element.description_html, path: @element.path, report_id: @element.report_id,
|
||||
title: @element.title, checklist_id: @checklist.id } }
|
||||
|
|
@ -26,25 +28,25 @@ class ElementsControllerTest < ActionDispatch::IntegrationTest
|
|||
assert_redirected_to report_url(Element.last.report)
|
||||
end
|
||||
|
||||
test 'should show element' do
|
||||
test "should show element" do
|
||||
get element_url(@element)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should get edit' do
|
||||
test "should get edit" do
|
||||
get edit_element_url(@element)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'should update element' do
|
||||
test "should update element" do
|
||||
patch element_url(@element),
|
||||
params: { element: { description_html: @element.description_html, path: @element.path, report_id: @element.report_id,
|
||||
title: @element.title } }
|
||||
assert_redirected_to element_url(@element)
|
||||
end
|
||||
|
||||
test 'should destroy element' do
|
||||
assert_difference('Element.count', -1) do
|
||||
test "should destroy element" do
|
||||
assert_difference("Element.count", -1) do
|
||||
delete element_url(@element)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'test_helper'
|
||||
require "test_helper"
|
||||
|
||||
class HomeControllerTest < ActionDispatch::IntegrationTest
|
||||
test 'should get show' do
|
||||
test "should get show" do
|
||||
get root_url
|
||||
assert_response :success
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class LinkCategoriesControllerTest < ActionDispatch::IntegrationTest
|
||||
|
|
@ -17,7 +19,8 @@ class LinkCategoriesControllerTest < ActionDispatch::IntegrationTest
|
|||
|
||||
test "should create link_category" do
|
||||
assert_difference("LinkCategory.count") do
|
||||
post link_categories_url, params: { link_category: { description: @link_category.description, name: @link_category.name } }
|
||||
post link_categories_url,
|
||||
params: { link_category: { description: @link_category.description, name: @link_category.name } }
|
||||
end
|
||||
|
||||
assert_redirected_to link_category_url(LinkCategory.last)
|
||||
|
|
@ -34,7 +37,8 @@ class LinkCategoriesControllerTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
test "should update link_category" do
|
||||
patch link_category_url(@link_category), params: { link_category: { description: @link_category.description, name: @link_category.name } }
|
||||
patch link_category_url(@link_category),
|
||||
params: { link_category: { description: @link_category.description, name: @link_category.name } }
|
||||
assert_redirected_to link_category_url(@link_category)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class LinksControllerTest < ActionDispatch::IntegrationTest
|
||||
|
|
@ -17,7 +19,9 @@ class LinksControllerTest < ActionDispatch::IntegrationTest
|
|||
|
||||
test "should create link" do
|
||||
assert_difference("Link.count") do
|
||||
post links_url, params: { link: { fail_count: @link.fail_count, last_check_at: @link.last_check_at, link_category_id: @link.link_category_id, text: @link.text, url: @link.url } }
|
||||
post links_url,
|
||||
params: { link: { fail_count: @link.fail_count, last_check_at: @link.last_check_at,
|
||||
link_category_id: @link.link_category_id, text: @link.text, url: @link.url } }
|
||||
end
|
||||
|
||||
assert_redirected_to link_url(Link.last)
|
||||
|
|
@ -34,7 +38,9 @@ class LinksControllerTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
test "should update link" do
|
||||
patch link_url(@link), params: { link: { fail_count: @link.fail_count, last_check_at: @link.last_check_at, link_category_id: @link.link_category_id, text: @link.text, url: @link.url } }
|
||||
patch link_url(@link),
|
||||
params: { link: { fail_count: @link.fail_count, last_check_at: @link.last_check_at,
|
||||
link_category_id: @link.link_category_id, text: @link.text, url: @link.url } }
|
||||
assert_redirected_to link_url(@link)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class ReportsControllerTest < ActionDispatch::IntegrationTest
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class SuccessCriteriaControllerTest < ActionDispatch::IntegrationTest
|
||||
|
|
@ -17,7 +19,9 @@ 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, description_html: @success_criterion.description_html, element_id: @success_criterion.element_id, level: @success_criterion.level, result: @success_criterion.result, title: @success_criterion.title } }
|
||||
post success_criteria_url,
|
||||
params: { success_criterion: { comment_html: @success_criterion.comment_html,
|
||||
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
|
||||
|
||||
assert_redirected_to success_criterion_url(SuccessCriterion.last)
|
||||
|
|
@ -34,7 +38,9 @@ class SuccessCriteriaControllerTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
test "should update success_criterion" do
|
||||
patch success_criterion_url(@success_criterion), params: { success_criterion: { comment_html: @success_criterion.comment_html, description_html: @success_criterion.description_html, element_id: @success_criterion.element_id, level: @success_criterion.level, result: @success_criterion.result, title: @success_criterion.title } }
|
||||
patch success_criterion_url(@success_criterion),
|
||||
params: { success_criterion: { comment_html: @success_criterion.comment_html,
|
||||
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue