Fix failures in commenting tests.

Restricting users from upvoting their own comments broke some tests.
Switch these tests to downvoting instead.
This commit is contained in:
evazion
2016-12-03 20:06:50 -06:00
parent 4f2988c809
commit 01afc46f74
3 changed files with 6 additions and 6 deletions

View File

@@ -58,7 +58,7 @@ class CommentTest < ActiveSupport::TestCase
end
dmail = Dmail.last
assert_equal("You were mentioned in a \"comment\":http://#{Danbooru.config.hostname}/posts/#{@comment.post_id}#comment-#{@comment.id}\n\n---\n\n[i]#{CurrentUser.name} said:[/i]\n\nHey @#{@user2.name} check this out!", dmail.body)
assert_equal("You were mentioned in a \"comment\":/posts/#{@comment.post_id}#comment-#{@comment.id}\n\n---\n\n[i]#{CurrentUser.name} said:[/i]\n\nHey @#{@user2.name} check this out!", dmail.body)
end
end
end

View File

@@ -111,7 +111,7 @@ class UserTest < ActiveSupport::TestCase
assert(@user.can_comment_vote?)
10.times do
comment = FactoryGirl.create(:comment)
FactoryGirl.create(:comment_vote, :comment_id => comment.id)
FactoryGirl.create(:comment_vote, :comment_id => comment.id, :score => -1)
end
assert(!@user.can_comment_vote?)