forked from e621ng/e621ng
[Config] Remove member_comment_time_threshold
This was only stubbed in tests and not used anywhere else
This commit is contained in:
parent
a023c2806e
commit
015c238dca
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user