favorites: don't regen fav count when adding favorites.
Don't randomly regen the fav count when favoriting a post. This was a workaround for #1210 that is no longer needed.
This commit is contained in:
@@ -38,19 +38,6 @@ class UserTest < ActiveSupport::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
context "favoriting a post" do
|
||||
setup do
|
||||
@user.update_column(:favorite_count, 999)
|
||||
@user.stubs(:clean_favorite_count?).returns(true)
|
||||
@post = FactoryGirl.create(:post)
|
||||
end
|
||||
|
||||
should "periodically clean the favorite_count" do
|
||||
@user.add_favorite!(@post)
|
||||
assert_equal(1, @user.favorite_count)
|
||||
end
|
||||
end
|
||||
|
||||
context "that has been invited by a mod" do
|
||||
setup do
|
||||
@mod = FactoryGirl.create(:moderator_user)
|
||||
|
||||
Reference in New Issue
Block a user