init comments

This commit is contained in:
Mark Moser
2017-02-10 12:03:50 -06:00
parent 37f6e49592
commit 9c2b53aa79
8 changed files with 130 additions and 2 deletions

View 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

View File

@ -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