Commit 66dc7159 authored by Pawel Chojnacki's avatar Pawel Chojnacki

Cleanup formatting

parent e5cf3f51
......@@ -62,7 +62,7 @@ module Gitlab
rescue TooManyIps => ex
Rails.logger.info ex.message
[429, {'Content-Type' => 'text/plain', 'Retry-After' => UniqueIpsLimiter.config.unique_ips_limit_time_window }, ["Retry later\n"]]
[429, { 'Content-Type' => 'text/plain', 'Retry-After' => UniqueIpsLimiter.config.unique_ips_limit_time_window }, ["Retry later\n"]]
end
end
end
......
......@@ -10,7 +10,6 @@ describe Gitlab::Auth::UniqueIpsLimiter, lib: true do
end
describe '#count_unique_ips' do
context 'non unique IPs' do
it 'properly counts them' do
expect(Gitlab::Auth::UniqueIpsLimiter.count_unique_ips(user.id, '192.168.1.1')).to eq(1)
......@@ -39,7 +38,6 @@ describe Gitlab::Auth::UniqueIpsLimiter, lib: true do
end
end
describe '#limit_user!' do
context 'when unique ips limit is enabled' do
before do
......
......@@ -3,12 +3,12 @@ require 'spec_helper'
describe Gitlab::RequestContext, lib: true do
describe '#client_ip' do
subject { Gitlab::RequestContext.client_ip }
let(:app) { -> env {} }
let(:app) { -> (env) {} }
let(:env) { Hash.new }
context 'when RequestStore::Middleware is used' do
around(:each) do |example|
RequestStore::Middleware.new(-> env { example.run }).call({})
RequestStore::Middleware.new(-> (env) { example.run }).call({})
end
context 'request' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment