diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/controllers/comments_controller_test.rb | 8 | ||||
| -rw-r--r-- | test/fixtures/comments.yml | 17 | ||||
| -rw-r--r-- | test/models/comment_test.rb | 7 |
3 files changed, 32 insertions, 0 deletions
| 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 @@ | |||
| 1 | require "test_helper" | ||
| 2 | |||
| 3 | class CommentsControllerTest < ActionDispatch::IntegrationTest | ||
| 4 | test "should get create" do | ||
| 5 | get comments_create_url | ||
| 6 | assert_response :success | ||
| 7 | end | ||
| 8 | 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 @@ | |||
| 1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html | ||
| 2 | |||
| 3 | one: | ||
| 4 | blog: one | ||
| 5 | username: MyString | ||
| 6 | email: MyString | ||
| 7 | website: MyString | ||
| 8 | body: MyText | ||
| 9 | status: MyString | ||
| 10 | |||
| 11 | two: | ||
| 12 | blog: two | ||
| 13 | username: MyString | ||
| 14 | email: MyString | ||
| 15 | website: MyString | ||
| 16 | body: MyText | ||
| 17 | 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 @@ | |||
| 1 | require "test_helper" | ||
| 2 | |||
| 3 | class CommentTest < ActiveSupport::TestCase | ||
| 4 | # test "the truth" do | ||
| 5 | # assert true | ||
| 6 | # end | ||
| 7 | end | ||
