Skip to content

Instantly share code, notes, and snippets.

@kiote
Created January 18, 2016 10:07
Show Gist options
  • Save kiote/4bd73d714c86037b50e5 to your computer and use it in GitHub Desktop.
Save kiote/4bd73d714c86037b50e5 to your computer and use it in GitHub Desktop.
require 'rails_helper'
describe Rack::Attack, :integration do
include Rack::Test::Methods
after(:each) do
Rack::Attack.cache.store.clear
end
context 'admin logins' do
let(:limit) { 6 }
it 'allows logins within threshold' do
post '/admin/login'
expect(last_response.status).to eq 200
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment