Fix #4931: Add popup voter list for comments.
Show the comment's upvote and downvote count when you hover over a comment's score. For mods, show the list of voters as well.
This commit is contained in:
@@ -27,6 +27,11 @@ class CommentVotesControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
should "render for a tooltip" do
|
||||
get comment_votes_path(comment_id: @comment.id, variant: "tooltip")
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
should respond_to_search({}).with { [] }
|
||||
end
|
||||
|
||||
@@ -35,6 +40,11 @@ class CommentVotesControllerTest < ActionDispatch::IntegrationTest
|
||||
CurrentUser.user = create(:mod_user)
|
||||
end
|
||||
|
||||
should "render for a tooltip" do
|
||||
get comment_votes_path(comment_id: @comment.id, variant: "tooltip")
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
should respond_to_search({}).with { [@unrelated_vote, @negative_vote, @vote] }
|
||||
should respond_to_search(score: -1).with { @negative_vote }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user