0
0
Fork 0

Fix spec descriptions around configurable limit values (#31079)

This commit is contained in:
Matt Jankowski 2024-07-22 04:02:31 -04:00 committed by GitHub
parent 5a60a3b80c
commit 6e4305de69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 30 additions and 13 deletions

View file

@ -19,8 +19,9 @@ describe ReactionValidator do
expect(reaction.errors).to be_empty
end
it 'adds error when 8 reactions already exist' do
%w(🐘 ❤️ 🙉 😍 😋 😂 😞 👍).each do |name|
it 'adds error when reaction limit count has already been reached' do
stub_const 'ReactionValidator::LIMIT', 2
%w(🐘 ❤️).each do |name|
announcement.announcement_reactions.create!(name: name, account: Fabricate(:account))
end