Poll showing, dequeueing, tests

This commit is contained in:
Martin Lensment 2014-11-07 14:21:13 +02:00
parent 6888cd15a4
commit 3bc7385caf
9 changed files with 216 additions and 9 deletions

View file

@ -103,10 +103,23 @@ describe 'EPP Domain', epp: true do
# should show up in other registrar's poll
response = epp_request(EppXml::Session.poll, :xml, :elkdata)
response = epp_request(EppXml::Session.poll, :xml, :zone)
expect(response[:msg]).to eq('Command completed successfully; ack to dequeue')
msg_q = response[:parsed].css('msgQ')
expect(msg_q.css('qDate').text).to_not be_blank
expect(msg_q.css('msg').text).to eq('Transfer requested.')
expect(msg_q.first['id']).to_not be_blank
expect(msg_q.first['count']).to eq('1')
xml = EppXml::Session.poll(poll: {
value: '', attrs: { op: 'ack', msgID: msg_q.first['id'] }
})
response = epp_request(xml, :xml, :zone)
expect(response[:msg]).to eq('Command completed successfully')
msg_q = response[:parsed].css('msgQ')
expect(msg_q.first['id']).to_not be_blank
expect(msg_q.first['count']).to eq('0')
end
it 'prohibits wrong registrar from approving transfer' do