mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +02:00
Do not validate invalid request #2660
This commit is contained in:
parent
7facd58f31
commit
265568dcf3
2 changed files with 5 additions and 5 deletions
|
@ -957,7 +957,7 @@ ActiveRecord::Schema.define(version: 20150525075550) do
|
|||
t.text "crt"
|
||||
t.string "type"
|
||||
t.string "registrant_ident"
|
||||
t.string "encrypted_password", default: ""
|
||||
t.string "encrypted_password", default: "", null: false
|
||||
t.datetime "remember_created_at"
|
||||
t.integer "failed_attempts", default: 0, null: false
|
||||
t.datetime "locked_at"
|
||||
|
|
|
@ -28,7 +28,7 @@ describe 'EPP Contact', epp: true do
|
|||
|
||||
context 'with valid user' do
|
||||
context 'create command' do
|
||||
def create_request(overwrites = {}, extension = {})
|
||||
def create_request(overwrites = {}, extension = {}, options = {})
|
||||
extension = @extension if extension.blank?
|
||||
|
||||
defaults = {
|
||||
|
@ -48,7 +48,7 @@ describe 'EPP Contact', epp: true do
|
|||
email: { value: 'test@example.example' }
|
||||
}
|
||||
create_xml = @epp_xml.create(defaults.deep_merge(overwrites), extension)
|
||||
epp_plain_request(create_xml, :xml)
|
||||
epp_plain_request(create_xml, options)
|
||||
end
|
||||
|
||||
it 'fails if request xml is missing' do
|
||||
|
@ -177,8 +177,8 @@ describe 'EPP Contact', epp: true do
|
|||
attrs: { type: 'birthday', cc: 'WRONG' }
|
||||
}
|
||||
}
|
||||
response = create_request({}, extension)
|
||||
response[:msg].should ==
|
||||
response = create_request({}, extension, validate_input: false)
|
||||
response[:msg].should ==
|
||||
'Ident country code is not valid, should be in ISO_3166-1 alpha 2 format [ident]'
|
||||
response[:result_code].should == '2005'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue