Allow specifying multiple ips for webclients #2744

This commit is contained in:
Martin Lensment 2015-07-20 16:57:12 +03:00 committed by Priit Tark
parent 7743f7caac
commit dff7e3047d
6 changed files with 15 additions and 12 deletions

View file

@ -2,7 +2,7 @@ require 'rails_helper'
describe Repp::AccountV1 do
it 'should fail without whitelisted IP' do
ENV['webclient_ip'] = '192.188.1.1'
ENV['webclient_ips'] = '192.188.1.1'
@registrar1 = Fabricate(:registrar, white_ips: [Fabricate(:white_ip_registrar)])
@api_user = Fabricate(:api_user, registrar: @registrar1)
@ -11,7 +11,7 @@ describe Repp::AccountV1 do
body = JSON.parse(response.body)
body['error'].should == 'IP is not whitelisted'
ENV['webclient_ip'] = '127.0.0.1'
ENV['webclient_ips'] = '127.0.0.1'
end
context 'with valid registrar' do