Skip to content

Instantly share code, notes, and snippets.

@njwest
Last active July 20, 2024 20:02
Show Gist options
  • Save njwest/a121e8ff792a1fdb17921d36e6c8878a to your computer and use it in GitHub Desktop.
Save njwest/a121e8ff792a1fdb17921d36e6c8878a to your computer and use it in GitHub Desktop.
doctest RateLimiter
test "allow_login_attempt?/2 returns true when login attempts do not exceed a limit of #{@limit}" do
assert RateLimiter.allow_login_attempt?(@test_email, @limit) == true
assert RateLimiter.allow_login_attempt?(@test_email, @limit) == true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment