DEV: fix a flakey spec in slugs_controller (#20350)
This commit is contained in:
parent
a945ca3e01
commit
052029b09b
|
@ -44,6 +44,8 @@ RSpec.describe "rate limiter integration" do
|
|||
expect(response.cookies.has_key?(name)).to eq(true)
|
||||
expect(response.cookies[name]).to be_nil
|
||||
end
|
||||
|
||||
RateLimiter.clear_all!
|
||||
end
|
||||
|
||||
it "can cleanly limit requests and sets a Retry-After header" do
|
||||
|
|
|
@ -24,6 +24,7 @@ RSpec.describe SlugsController do
|
|||
|
||||
it "rate limits" do
|
||||
RateLimiter.enable
|
||||
RateLimiter.clear_all!
|
||||
|
||||
stub_const(SlugsController, "MAX_SLUG_GENERATIONS_PER_MINUTE", 1) do
|
||||
post "/slugs.json?name=#{name}"
|
||||
|
|
Loading…
Reference in New Issue