mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
Acceptance test throttle Retry-After header
This commit is contained in:
parent
d3404a7a91
commit
5e0cd031b6
1 changed files with 2 additions and 0 deletions
|
|
@ -16,6 +16,8 @@ describe "#throttle" do
|
|||
get "/", {}, "REMOTE_ADDR" => "1.2.3.4"
|
||||
|
||||
assert_equal 429, last_response.status
|
||||
assert_equal "60", last_response.headers["Retry-After"]
|
||||
assert_equal "Retry later\n", last_response.body
|
||||
|
||||
get "/", {}, "REMOTE_ADDR" => "5.6.7.8"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue