finishing new page/blog

This commit is contained in:
2022-12-27 16:47:57 +02:00
parent 57fdada4fa
commit d6b238ba94
8 changed files with 52 additions and 25 deletions

View File

@ -31,14 +31,14 @@ class PagesWrite < ActionDispatch::IntegrationTest
click_on ("Update")
end
end
def test_new_works_without
def test_new_handles_noinput
visit "/merged/pages"
within(".new_page") do
click_on ("New Page")
end
assert_equal "/merged/pages" , current_path
end
def test_new_works_with_name
def test_new_page_works_with_name
visit "/merged/pages"
within(".new_page") do
fill_in 'Name', with: 'New Page'
@ -47,6 +47,15 @@ class PagesWrite < ActionDispatch::IntegrationTest
assert_equal "/merged/sections/41/select_template" , current_path
end
def test_new_blog_works_with_name
visit "/merged/pages"
within(".new_page") do
fill_in 'Name', with: 'New Page'
click_on ("New Blog")
end
assert_equal "/merged/sections/41" , current_path
end
def test_delete_works
id = Merged::Page.first.id
visit merged.page_sections_path(id)