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/controllers/.keep Normal file
View File

View File

@@ -0,0 +1,48 @@
require "test_helper"
class SuggestionsControllerTest < ActionDispatch::IntegrationTest
setup do
@suggestion = suggestions(:one)
end
test "should get index" do
get suggestions_url
assert_response :success
end
test "should get new" do
get new_suggestion_url
assert_response :success
end
test "should create suggestion" do
assert_difference("Suggestion.count") do
post suggestions_url, params: { suggestion: { body: @suggestion.body, sent: @suggestion.sent, subject: @suggestion.subject } }
end
assert_redirected_to suggestion_url(Suggestion.last)
end
test "should show suggestion" do
get suggestion_url(@suggestion)
assert_response :success
end
test "should get edit" do
get edit_suggestion_url(@suggestion)
assert_response :success
end
test "should update suggestion" do
patch suggestion_url(@suggestion), params: { suggestion: { body: @suggestion.body, sent: @suggestion.sent, subject: @suggestion.subject } }
assert_redirected_to suggestion_url(@suggestion)
end
test "should destroy suggestion" do
assert_difference("Suggestion.count", -1) do
delete suggestion_url(@suggestion)
end
assert_redirected_to suggestions_url
end
end