From 835af696703484208882a70cc5dd47c5838ecf58 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 12 Oct 2023 17:10:34 -0400 Subject: Added blog post commenting --- test/controllers/comments_controller_test.rb | 8 ++++++++ test/fixtures/comments.yml | 17 +++++++++++++++++ test/models/comment_test.rb | 7 +++++++ 3 files changed, 32 insertions(+) create mode 100644 test/controllers/comments_controller_test.rb create mode 100644 test/fixtures/comments.yml create mode 100644 test/models/comment_test.rb (limited to 'test') diff --git a/test/controllers/comments_controller_test.rb b/test/controllers/comments_controller_test.rb new file mode 100644 index 0000000..3bcb0dc --- /dev/null +++ b/test/controllers/comments_controller_test.rb @@ -0,0 +1,8 @@ +require "test_helper" + +class CommentsControllerTest < ActionDispatch::IntegrationTest + test "should get create" do + get comments_create_url + assert_response :success + end +end diff --git a/test/fixtures/comments.yml b/test/fixtures/comments.yml new file mode 100644 index 0000000..1d6475a --- /dev/null +++ b/test/fixtures/comments.yml @@ -0,0 +1,17 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + blog: one + username: MyString + email: MyString + website: MyString + body: MyText + status: MyString + +two: + blog: two + username: MyString + email: MyString + website: MyString + body: MyText + status: MyString diff --git a/test/models/comment_test.rb b/test/models/comment_test.rb new file mode 100644 index 0000000..5a6feda --- /dev/null +++ b/test/models/comment_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class CommentTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end -- cgit 1.4.1