I am stupid

This commit is contained in:
Tom 2020-10-08 21:14:04 +01:00
parent fc11562191
commit 3043033f0a
No known key found for this signature in database
GPG Key ID: D3E7EAA31B39637E

View File

@ -119,7 +119,7 @@ func Test_Limiter_Headers(t *testing.T) {
app.Handler()(fctx)
utils.AssertEqual(t, "50", string(fctx.Response.Header.Peek("X-RateLimit-Limit")))
if v := string(fctx.Response.Header.Peek("X-RateLimit-Reset")); v != "" {
if v := string(fctx.Response.Header.Peek("X-RateLimit-Remaining")); v != "" {
t.Errorf("The X-RateLimit-Remaining header is not set correctly - value is an empty string.")
}
if v := string(fctx.Response.Header.Peek("X-RateLimit-Reset")); !(v == "1" || v == "2") {