BURs: add test for users voting on their own BURs (#4527)
This commit is contained in:
@@ -36,6 +36,13 @@ class ForumPostVotesControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_response 403
|
||||
end
|
||||
end
|
||||
|
||||
should "not allow creators to vote on their own BURs" do
|
||||
assert_difference("ForumPostVote.count", 0) do
|
||||
post_auth forum_post_votes_path(format: :js), @bulk_update_request.user, params: { forum_post_id: @forum_post.id, forum_post_vote: { score: 1 }}
|
||||
assert_response 403
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "destroy action" do
|
||||
|
||||
Reference in New Issue
Block a user