Add kmyblue original comments

This commit is contained in:
KMY 2025-05-07 09:22:27 +09:00
parent 721f6f9c97
commit 7d80e90976

View file

@ -7,6 +7,8 @@ RSpec.describe Rack::Attack, type: :request do
Rails.application
end
# kmyblue original fix for test error
def below_limit
limit - 1
end
@ -27,6 +29,8 @@ RSpec.describe Rack::Attack, type: :request do
described_class.cache.count("#{throttle}:#{discriminator}", period)
end
# kmyblue original fix for test error (end)
shared_context 'with throttled endpoint base' do
before do
# Rack::Attack periods are not rolling, so avoid flaky tests by setting the time in a way