Refactorings and gui improvements
This commit is contained in:
parent
c965e03e5a
commit
d1294c2fc4
46 changed files with 358 additions and 128020 deletions
|
|
@ -25,20 +25,19 @@ class ElementsControllerTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
test "should get index" do
|
||||
get elements_url
|
||||
get page_elements_url(@element.page)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get new_element_url
|
||||
get new_page_element_url(@element.page)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
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 } }
|
||||
post page_elements_url(@element.page),
|
||||
params: { element: { description: @element.description, title: @element.title, checklist_id: @checklist.id } }
|
||||
end
|
||||
|
||||
assert_redirected_to report_url(Element.last.report)
|
||||
|
|
@ -56,7 +55,7 @@ class ElementsControllerTest < ActionDispatch::IntegrationTest
|
|||
|
||||
test "should update element" do
|
||||
patch element_url(@element),
|
||||
params: { element: { description_html: @element.description_html, path: @element.path, report_id: @element.report_id,
|
||||
params: { element: { description: @element.description, page_id: @element.page_id,
|
||||
title: @element.title } }
|
||||
assert_redirected_to element_url(@element)
|
||||
end
|
||||
|
|
@ -66,6 +65,6 @@ class ElementsControllerTest < ActionDispatch::IntegrationTest
|
|||
delete element_url(@element)
|
||||
end
|
||||
|
||||
assert_redirected_to elements_url
|
||||
assert_redirected_to page_elements_url(@element.page)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue