start of iteration 2
This commit is contained in:
parent
9fb87a74ce
commit
729ed13521
75 changed files with 705 additions and 170 deletions
47
test/system/pages_test.rb
Normal file
47
test/system/pages_test.rb
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
require "application_system_test_case"
|
||||
|
||||
class PagesTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@page = pages(:one)
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
visit pages_url
|
||||
assert_selector "h1", text: "Pages"
|
||||
end
|
||||
|
||||
test "should create page" do
|
||||
visit pages_url
|
||||
click_on "New page"
|
||||
|
||||
fill_in "Path", with: @page.path
|
||||
fill_in "Position", with: @page.position
|
||||
fill_in "Report", with: @page.report_id
|
||||
fill_in "Url", with: @page.url
|
||||
click_on "Create Page"
|
||||
|
||||
assert_text "Page was successfully created"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should update Page" do
|
||||
visit page_url(@page)
|
||||
click_on "Edit this page", match: :first
|
||||
|
||||
fill_in "Path", with: @page.path
|
||||
fill_in "Position", with: @page.position
|
||||
fill_in "Report", with: @page.report_id
|
||||
fill_in "Url", with: @page.url
|
||||
click_on "Update Page"
|
||||
|
||||
assert_text "Page was successfully updated"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should destroy Page" do
|
||||
visit page_url(@page)
|
||||
click_on "Destroy this page", match: :first
|
||||
|
||||
assert_text "Page was successfully destroyed"
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue