lastish from the api changes (coverage not 100) and change reset

This commit is contained in:
2022-12-26 20:29:43 +02:00
parent ac18050586
commit ba022b5259
8 changed files with 74 additions and 34 deletions

View File

@ -36,6 +36,7 @@ class PagesWrite < ActionDispatch::IntegrationTest
within(".new_page") do
click_on ("New Page")
end
assert_equal "/merged/pages" , current_path
end
def test_new_works_with_name
visit "/merged/pages"
@ -43,6 +44,17 @@ class PagesWrite < ActionDispatch::IntegrationTest
fill_in 'Name', with: 'New Page'
click_on ("New Page")
end
assert_equal "/merged/sections/41/select_template" , current_path
end
def test_delete_works
id = Merged::Page.first.id
visit merged.page_sections_path(id)
within(".delete_page") do
click_on ("Delete Page")
end
assert_equal "/merged/pages" , current_path
assert_raise(ActiveHash::RecordNotFound) {visit merged.page_path(id)}
end
end