init comments
This commit is contained in:
27
test/models/quiz_comment_test.rb
Normal file
27
test/models/quiz_comment_test.rb
Normal file
@ -0,0 +1,27 @@
|
||||
# frozen_string_literal: true
|
||||
require 'test_helper'
|
||||
|
||||
class QuizCommentTest < ActiveSupport::TestCase
|
||||
test "the truth" do
|
||||
assert QuizComment
|
||||
end
|
||||
|
||||
test "user to comments association" do
|
||||
manager = users(:manager)
|
||||
|
||||
assert_equal 4, manager.quiz_comments.size
|
||||
end
|
||||
|
||||
test "candidate to comments association" do
|
||||
candidate = candidates(:elsie)
|
||||
|
||||
assert_equal 6, candidate.quiz_comments.size
|
||||
end
|
||||
|
||||
test 'comment to user' do
|
||||
comment = quiz_comments(:com1)
|
||||
|
||||
assert_match 'Wade', comment.candidate.name
|
||||
assert_match 'Tina', comment.user.name
|
||||
end
|
||||
end
|
@ -3,7 +3,7 @@ require 'test_helper'
|
||||
|
||||
class ReviewerVoteTest < ActiveSupport::TestCase
|
||||
test "the truth" do
|
||||
assert ReviewerVoteTest
|
||||
assert ReviewerVote
|
||||
end
|
||||
|
||||
test "richard has 3 votes" do
|
||||
|
Reference in New Issue
Block a user