Basic feature implemented, very basic poc
This commit is contained in:
parent
216089a3e7
commit
48c0067076
118 changed files with 2113 additions and 20 deletions
43
test/system/reports_test.rb
Normal file
43
test/system/reports_test.rb
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
require "application_system_test_case"
|
||||
|
||||
class ReportsTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@report = reports(:one)
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
visit reports_url
|
||||
assert_selector "h1", text: "Reports"
|
||||
end
|
||||
|
||||
test "should create report" do
|
||||
visit reports_url
|
||||
click_on "New report"
|
||||
|
||||
fill_in "Comment", with: @report.comment
|
||||
fill_in "Name", with: @report.name
|
||||
click_on "Create Report"
|
||||
|
||||
assert_text "Report was successfully created"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should update Report" do
|
||||
visit report_url(@report)
|
||||
click_on "Edit this report", match: :first
|
||||
|
||||
fill_in "Comment", with: @report.comment
|
||||
fill_in "Name", with: @report.name
|
||||
click_on "Update Report"
|
||||
|
||||
assert_text "Report was successfully updated"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should destroy Report" do
|
||||
visit report_url(@report)
|
||||
click_on "Destroy this report", match: :first
|
||||
|
||||
assert_text "Report was successfully destroyed"
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue