add post count estimates for bulk update requests

This commit is contained in:
Albert Yi
2019-01-09 15:54:55 -08:00
parent 844b1a81ba
commit f33b23d035
11 changed files with 112 additions and 17 deletions

View File

@@ -20,6 +20,16 @@ module Moderator
CurrentUser.ip_addr = nil
end
context "#estimate_update_count" do
setup do
@change = TagBatchChange.new("aaa", "bbb", @user.id, "127.0.0.1")
end
should "find the correct count" do
assert_equal(1, @change.estimate_update_count)
end
end
should "execute" do
tag_batch_change = TagBatchChange.new("aaa", "bbb", @user.id, "127.0.0.1")
tag_batch_change.perform