skill-assessment-app/test/models/quiz_comment_test.rb

28 lines
582 B
Ruby
Raw Normal View History

2017-02-10 12:03:50 -06:00
# 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 5, manager.quiz_comments.size
2017-02-10 12:03:50 -06:00
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