[Config] Remove member_comment_time_threshold

This was only stubbed in tests and not used anywhere else
This commit is contained in:
Earlopain 2021-05-14 17:07:43 +02:00
parent a023c2806e
commit 015c238dca
No known key found for this signature in database
GPG Key ID: 6CFB948E15246897
7 changed files with 0 additions and 12 deletions

View File

@ -373,10 +373,6 @@ fart'
2000
end
def member_comment_time_threshold
1.week.ago
end
# Permanently redirect all HTTP requests to HTTPS.
#
# https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security

View File

@ -5,7 +5,6 @@ class CommentVotesControllerTest < ActionDispatch::IntegrationTest
setup do
CurrentUser.user = @user = create(:user)
CurrentUser.ip_addr = "127.0.0.1"
Danbooru.config.stubs(:member_comment_time_threshold).returns(1.week.from_now)
@comment = create(:comment)
end

View File

@ -7,7 +7,6 @@ class CommentsControllerTest < ActionDispatch::IntegrationTest
@user = FactoryBot.create(:member_user)
CurrentUser.user = @user
CurrentUser.ip_addr = "127.0.0.1"
Danbooru.config.stubs(:member_comment_time_threshold).returns(1.week.from_now)
@post = FactoryBot.create(:post)
@comment = FactoryBot.create(:comment, :post => @post)

View File

@ -8,7 +8,6 @@ module Moderator
@user = create(:privileged_user)
end
@admin = create(:admin_user)
Danbooru.config.stubs(:member_comment_time_threshold).returns(1.week.from_now)
end
context "show action" do

View File

@ -17,7 +17,6 @@ class CommentTest < ActiveSupport::TestCase
setup do
@post = FactoryBot.create(:post)
Danbooru.config.stubs(:member_comment_limit).returns(100)
Danbooru.config.stubs(:member_comment_time_threshold).returns(1.week.from_now)
end
context "added in an edit" do
@ -85,7 +84,6 @@ class CommentTest < ActiveSupport::TestCase
context "created by a limited user" do
setup do
Danbooru.config.stubs(:member_comment_limit).returns(5)
Danbooru.config.stubs(:member_comment_time_threshold).returns(1.week.ago)
end
should "fail creation" do
@ -98,7 +96,6 @@ class CommentTest < ActiveSupport::TestCase
context "created by an unlimited user" do
setup do
Danbooru.config.stubs(:member_comment_limit).returns(100)
Danbooru.config.stubs(:member_comment_time_threshold).returns(1.week.from_now)
end
context "that is then deleted" do

View File

@ -7,7 +7,6 @@ module Moderator
@user = FactoryBot.create(:user)
CurrentUser.user = @user
CurrentUser.ip_addr = "127.0.0.1"
Danbooru.config.stubs(:member_comment_time_threshold).returns(1.week.from_now)
@comment = FactoryBot.create(:comment)
PoolArchive.stubs(:enabled?).returns(false)
PostArchive.stubs(:enabled?).returns(false)

View File

@ -67,7 +67,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_equal(@user.can_comment_vote_with_reason?, true)
10.times do