users: give all users unlimited favorites.

Let all users have unlimited favorites. Formerly the limit was 10k
favorites for regular members, 20k for Gold, and unlimited for Platinum.

Limiting favorites doesn't make sense since upvotes are unlimited.
This commit is contained in:
evazion
2021-10-07 06:27:09 -05:00
parent 7d503f088e
commit 7fa23c5fbf
5 changed files with 4 additions and 33 deletions

View File

@@ -47,12 +47,5 @@ class FavoriteTest < ActiveSupport::TestCase
assert_equal("You have already favorited this post", error.message)
assert_equal(1, @user1.favorite_count)
end
should "not allow exceeding the user's favorite limit" do
@user1.stubs(:favorite_limit).returns(0)
error = assert_raises(Favorite::Error) { @p1.add_favorite!(@user1) }
assert_equal("You can only keep up to 0 favorites. Upgrade your account to save more.", error.message)
end
end
end