Refactor test #2809

This commit is contained in:
Martin Lensment 2015-08-11 13:01:09 +03:00
parent 4c981e736a
commit dff3a80592

View file

@ -1008,30 +1008,26 @@ describe 'EPP Domain', epp: true do
# should show up in other registrar's poll
response = login_as :registrar2 do
epp_plain_request(@epp_xml.session.poll)
login_as :registrar2 do
response = epp_plain_request(@epp_xml.session.poll)
response[:msg].should == 'Command completed successfully; ack to dequeue'
msg_q = response[:parsed].css('msgQ')
msg_q.css('qDate').text.should_not be_blank
msg_q.css('msg').text.should == 'Transfer requested.'
msg_q.first['id'].should_not be_blank
msg_q.first['count'].should == '1'
xml = @epp_xml.session.poll(poll: {
value: '', attrs: { op: 'ack', msgID: msg_q.first['id'] }
})
response = epp_plain_request(xml)
response[:msg].should == 'Command completed successfully'
msg_q = response[:parsed].css('msgQ')
msg_q.first['id'].should_not be_blank
msg_q.first['count'].should == '0'
end
response[:msg].should == 'Command completed successfully; ack to dequeue'
msg_q = response[:parsed].css('msgQ')
msg_q.css('qDate').text.should_not be_blank
msg_q.css('msg').text.should == 'Transfer requested.'
msg_q.first['id'].should_not be_blank
msg_q.first['count'].should == '1'
xml = @epp_xml.session.poll(poll: {
value: '', attrs: { op: 'ack', msgID: msg_q.first['id'] }
})
response = login_as :registrar2 do
epp_plain_request(xml)
end
response[:msg].should == 'Command completed successfully'
msg_q = response[:parsed].css('msgQ')
msg_q.first['id'].should_not be_blank
msg_q.first['count'].should == '0'
create_settings
end