first commit

This commit is contained in:
Kris
2024-02-03 08:34:36 -05:00
commit 2f398caa90
102 changed files with 2717 additions and 0 deletions

0
test/system/.keep Normal file
View File

View File

@@ -0,0 +1,45 @@
require "application_system_test_case"
class SuggestionsTest < ApplicationSystemTestCase
setup do
@suggestion = suggestions(:one)
end
test "visiting the index" do
visit suggestions_url
assert_selector "h1", text: "Suggestions"
end
test "should create suggestion" do
visit suggestions_url
click_on "New suggestion"
fill_in "Body", with: @suggestion.body
check "Sent" if @suggestion.sent
fill_in "Subject", with: @suggestion.subject
click_on "Create Suggestion"
assert_text "Suggestion was successfully created"
click_on "Back"
end
test "should update Suggestion" do
visit suggestion_url(@suggestion)
click_on "Edit this suggestion", match: :first
fill_in "Body", with: @suggestion.body
check "Sent" if @suggestion.sent
fill_in "Subject", with: @suggestion.subject
click_on "Update Suggestion"
assert_text "Suggestion was successfully updated"
click_on "Back"
end
test "should destroy Suggestion" do
visit suggestion_url(@suggestion)
click_on "Destroy this suggestion", match: :first
assert_text "Suggestion was successfully destroyed"
end
end