From 96813a5e508a54257ef03be613a704f1f71af53d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 21 Oct 2023 00:25:50 -0400 Subject: Added quotes database --- test/controllers/quotes_controller_test.rb | 18 ++++++++++++++++++ test/fixtures/quotes.yml | 17 +++++++++++++++++ test/models/quote_test.rb | 7 +++++++ 3 files changed, 42 insertions(+) create mode 100644 test/controllers/quotes_controller_test.rb create mode 100644 test/fixtures/quotes.yml create mode 100644 test/models/quote_test.rb (limited to 'test') diff --git a/test/controllers/quotes_controller_test.rb b/test/controllers/quotes_controller_test.rb new file mode 100644 index 0000000..a085d40 --- /dev/null +++ b/test/controllers/quotes_controller_test.rb @@ -0,0 +1,18 @@ +require "test_helper" + +class QuotesControllerTest < ActionDispatch::IntegrationTest + test "should get index" do + get quotes_index_url + assert_response :success + end + + test "should get show" do + get quotes_show_url + assert_response :success + end + + test "should get new" do + get quotes_new_url + assert_response :success + end +end diff --git a/test/fixtures/quotes.yml b/test/fixtures/quotes.yml new file mode 100644 index 0000000..761703f --- /dev/null +++ b/test/fixtures/quotes.yml @@ -0,0 +1,17 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + content: MyText + state: MyString + submitter: MyString + notes: MyText + upvotes: 1 + downvotes: 1 + +two: + content: MyText + state: MyString + submitter: MyString + notes: MyText + upvotes: 1 + downvotes: 1 diff --git a/test/models/quote_test.rb b/test/models/quote_test.rb new file mode 100644 index 0000000..d58ff5c --- /dev/null +++ b/test/models/quote_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class QuoteTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end -- cgit 1.4.1