comments: allow new users to comment.

Remove the rule that users less than a week old can't leave comments.
This commit is contained in:
evazion
2020-03-21 22:23:29 -05:00
parent aefbed57b8
commit 63f7311489
9 changed files with 4 additions and 50 deletions

View File

@@ -40,7 +40,6 @@ class UserTest < ActiveSupport::TestCase
end
should "limit comment votes" do
Danbooru.config.stubs(:member_comment_time_threshold).returns(1.week.from_now)
Danbooru.config.stubs(:member_comment_limit).returns(10)
assert(@user.can_comment_vote?)
@@ -51,18 +50,6 @@ class UserTest < ActiveSupport::TestCase
assert(@user.can_comment_vote?)
end
should "limit comments" do
assert(!@user.can_comment?)
@user.update_column(:level, User::Levels::GOLD)
assert(@user.can_comment?)
@user.update_column(:level, User::Levels::MEMBER)
@user.update_column(:created_at, 1.year.ago)
assert(@user.can_comment?)
assert(!@user.is_comment_limited?)
create_list(:comment, Danbooru.config.member_comment_limit, creator: @user)
assert(@user.is_comment_limited?)
end
should "authenticate" do
assert(User.authenticate(@user.name, "password"), "Authentication should have succeeded")
assert(!User.authenticate(@user.name, "password2"), "Authentication should not have succeeded")