comment creation

This commit is contained in:
Mark Moser committed 2017-02-13 15:54:57 -06:00
1 parent 567b4a409d
commit da5dc4bd94
5 files changed
+50 -3

No files matched your search

@@ -0,0 +1,19 @@
# frozen_string_literal: true
require 'test_helper'
module Admin
class CommentControllerTest < ActionDispatch::IntegrationTest
test "should post create" do
auth_reviewer
candidate = candidates(:stacy)
assert_difference("QuizComment.count") do
post admin_create_comment_url(test_hash: candidate.test_hash), params: { quiz_comment: {
message: 'this is a test comment'
} }
end
assert_redirected_to admin_result_url(test_hash: candidate.test_hash)
assert flash[:success]
end
end
end