burs/show: remove BUR update count estimate.

Remove the post update count estimate from BUR show pages. This was
complex, slow, and usually inaccurate since it assumed that requests in
a BUR had no overlap with each other, which usually wasn't the case.
This commit is contained in:
evazion
2020-02-16 19:17:46 -06:00
parent c4521acb54
commit 5817af4014
10 changed files with 0 additions and 105 deletions

View File

@@ -7,12 +7,6 @@ class TagBatchChangeJobTest < ActiveJob::TestCase
@post = create(:post, :tag_string => "aaa")
end
context "#estimate_update_count" do
should "find the correct count" do
assert_equal(1, TagBatchChangeJob.estimate_update_count("aaa", "bbb"))
end
end
should "execute" do
TagBatchChangeJob.perform_now("aaa", "bbb", @user, "127.0.0.1")
assert_equal("bbb", @post.reload.tag_string)

View File

@@ -48,28 +48,6 @@ class AliasAndImplicationImporterTest < ActiveSupport::TestCase
end
end
context "#estimate_update_count" do
setup do
FactoryBot.create(:post, tag_string: "aaa")
FactoryBot.create(:post, tag_string: "bbb")
FactoryBot.create(:post, tag_string: "ccc")
FactoryBot.create(:post, tag_string: "ddd")
FactoryBot.create(:post, tag_string: "eee")
@script = "create alias aaa -> 000\n" +
"create implication bbb -> 111\n" +
"remove alias ccc -> 222\n" +
"remove implication ddd -> 333\n" +
"mass update eee -> 444\n"
end
subject { AliasAndImplicationImporter.new(@script, nil) }
should "return the correct count" do
assert_equal(3, subject.estimate_update_count)
end
end
context "given a valid list" do
setup do
@list = "create alias abc -> def\ncreate implication aaa -> bbb\n"

View File

@@ -13,28 +13,6 @@ class BulkUpdateRequestTest < ActiveSupport::TestCase
CurrentUser.ip_addr = nil
end
context "#estimate_update_count" do
setup do
FactoryBot.create(:post, tag_string: "aaa")
FactoryBot.create(:post, tag_string: "bbb")
FactoryBot.create(:post, tag_string: "ccc")
FactoryBot.create(:post, tag_string: "ddd")
FactoryBot.create(:post, tag_string: "eee")
@script = "create alias aaa -> 000\n" +
"create implication bbb -> 111\n" +
"remove alias ccc -> 222\n" +
"remove implication ddd -> 333\n" +
"mass update eee -> 444\n"
end
subject { BulkUpdateRequest.new(script: @script) }
should "return the correct count" do
assert_equal(3, subject.estimate_update_count)
end
end
context "#update_notice" do
setup do
@forum_topic = create(:forum_topic, creator: @admin)

View File

@@ -57,17 +57,6 @@ class TagAliasTest < ActiveSupport::TestCase
end
end
context "#estimate_update_count" do
setup do
FactoryBot.create(:post, tag_string: "aaa bbb ccc")
@alias = FactoryBot.create(:tag_alias, antecedent_name: "aaa", consequent_name: "bbb", status: "pending")
end
should "get the right count" do
assert_equal(1, @alias.estimate_update_count)
end
end
context "#update_notice" do
setup do
@forum_topic = FactoryBot.create(:forum_topic)

View File

@@ -53,17 +53,6 @@ class TagImplicationTest < ActiveSupport::TestCase
end
end
context "#estimate_update_count" do
setup do
FactoryBot.create(:post, tag_string: "aaa bbb ccc")
@implication = FactoryBot.create(:tag_implication, antecedent_name: "aaa", consequent_name: "bbb", status: "pending")
end
should "get the right count" do
assert_equal(1, @implication.estimate_update_count)
end
end
context "#update_notice" do
setup do
@forum_topic = FactoryBot.create(:forum_topic)