models: set more creator names explicitly.

Set creators explicitly for bans, BURs, comment votes, and posts.
This commit is contained in:
evazion
2020-02-23 02:42:12 -06:00
parent 3a018ee9f7
commit e47d0e0d05
16 changed files with 18 additions and 64 deletions

View File

@@ -26,7 +26,7 @@ class CommentVotesControllerTest < ActionDispatch::IntegrationTest
end
should "fail silently on errors" do
create(:comment_vote, comment: @comment, score: -1)
create(:comment_vote, user: @user, comment: @comment, score: -1)
assert_difference("CommentVote.count", 0) do
post_auth comment_comment_votes_path(comment_id: @comment.id, score: "down", format: "json"), @user
assert_response 422
@@ -47,7 +47,7 @@ class CommentVotesControllerTest < ActionDispatch::IntegrationTest
end
should "fail on errors" do
create(:comment_vote, :comment => @comment, :score => -1)
create(:comment_vote, user: @user, comment: @comment, score: -1)
assert_difference("CommentVote.count", 0) do
post_auth comment_comment_votes_path(comment_id: @comment.id, :score => "down", format: "js"), @user
assert_response 422