mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +02:00
Updated account spec to generate doc #2928
This commit is contained in:
parent
48aa2b9a6a
commit
8b3c240262
1 changed files with 3 additions and 1 deletions
|
@ -3,7 +3,8 @@ require 'rails_helper'
|
|||
describe Repp::AccountV1 do
|
||||
it 'should fail without whitelisted IP' do
|
||||
ENV['webclient_ips'] = '192.188.1.1'
|
||||
@registrar1 = Fabricate(:registrar, white_ips: [Fabricate(:white_ip_registrar)])
|
||||
Setting.api_ip_whitelist_enabled = true
|
||||
@registrar1 = Fabricate(:registrar, white_ips: [Fabricate(:white_ip_registrar, ipv4: '99.99.99.99')])
|
||||
@api_user = Fabricate(:api_user, registrar: @registrar1)
|
||||
|
||||
get_with_auth '/repp/v1/accounts/balance', {}, @api_user
|
||||
|
@ -12,6 +13,7 @@ describe Repp::AccountV1 do
|
|||
|
||||
body['error'].should == 'IP is not whitelisted'
|
||||
ENV['webclient_ips'] = '127.0.0.1'
|
||||
Setting.api_ip_whitelist_enabled = false
|
||||
end
|
||||
|
||||
context 'with valid registrar' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue