mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 15:34:41 +02:00
parent
dbf5c8b4aa
commit
7147144894
8 changed files with 38 additions and 18 deletions
|
@ -164,7 +164,7 @@ RSpec.describe Contact::Ident, db: false do
|
|||
describe '::mismatches' do
|
||||
it 'returns mismatches' do
|
||||
mismatches = [
|
||||
Contact::Ident::Mismatch.new('birthday', Country.new('EE')),
|
||||
Contact::Ident::Mismatch.new('birthday', Country.new('EE'))
|
||||
]
|
||||
|
||||
expect(described_class.mismatches).to eq(mismatches)
|
||||
|
|
|
@ -12,7 +12,7 @@ RSpec.describe EPP::Response::Result, db: false do
|
|||
'2001' => :syntax_error,
|
||||
'2003' => :required_param_missing,
|
||||
'2005' => :param_syntax_error,
|
||||
'2308' => :data_management_policy_violation,
|
||||
'2308' => :data_management_policy_violation
|
||||
}
|
||||
|
||||
expect(described_class.codes).to eq(codes)
|
||||
|
|
|
@ -219,7 +219,7 @@ RSpec.describe 'EPP contact:create' do
|
|||
|
||||
before do
|
||||
mismatches = [
|
||||
Contact::Ident::Mismatch.new('priv', Country.new('DE')),
|
||||
Contact::Ident::Mismatch.new('priv', Country.new('DE'))
|
||||
]
|
||||
allow(Contact::Ident).to receive(:mismatches).and_return(mismatches)
|
||||
end
|
||||
|
|
|
@ -37,15 +37,24 @@ RSpec.describe 'EPP contact:update' do
|
|||
let!(:contact) { create(:contact, code: 'TEST', ident: 'test', ident_type: 'priv', ident_country_code: 'US') }
|
||||
|
||||
it 'does not update code' do
|
||||
expect { request; contact.reload }.to_not change { ident.code }
|
||||
expect do
|
||||
request
|
||||
contact.reload
|
||||
end.to_not change { ident.code }
|
||||
end
|
||||
|
||||
it 'does not update type' do
|
||||
expect { request; contact.reload }.to_not change { ident.type }
|
||||
expect do
|
||||
request
|
||||
contact.reload
|
||||
end.to_not change { ident.type }
|
||||
end
|
||||
|
||||
it 'does not update country code' do
|
||||
expect { request; contact.reload }.to_not change { ident.country_code }
|
||||
expect do
|
||||
request
|
||||
contact.reload
|
||||
end.to_not change { ident.country_code }
|
||||
end
|
||||
|
||||
specify do
|
||||
|
@ -90,7 +99,10 @@ RSpec.describe 'EPP contact:update' do
|
|||
}
|
||||
|
||||
it 'does not update code' do
|
||||
expect { request; contact.reload }.to_not change { ident.code }
|
||||
expect do
|
||||
request
|
||||
contact.reload
|
||||
end.to_not change { ident.code }
|
||||
end
|
||||
|
||||
it 'updates type' do
|
||||
|
@ -137,15 +149,24 @@ RSpec.describe 'EPP contact:update' do
|
|||
}
|
||||
|
||||
it 'does not update code' do
|
||||
expect { request; contact.reload }.to_not change { ident.code }
|
||||
expect do
|
||||
request
|
||||
contact.reload
|
||||
end.to_not change { ident.code }
|
||||
end
|
||||
|
||||
it 'does not update type' do
|
||||
expect { request; contact.reload }.to_not change { ident.type }
|
||||
expect do
|
||||
request
|
||||
contact.reload
|
||||
end.to_not change { ident.type }
|
||||
end
|
||||
|
||||
it 'does not update country code' do
|
||||
expect { request; contact.reload }.to_not change { ident.country_code }
|
||||
expect do
|
||||
request
|
||||
contact.reload
|
||||
end.to_not change { ident.country_code }
|
||||
end
|
||||
|
||||
specify do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue