Refactor domain info builder

This commit is contained in:
Martin Lensment 2014-10-21 18:17:18 +03:00
parent 7e5d6204c6
commit 5464e4c342
3 changed files with 22 additions and 12 deletions

View file

@ -158,7 +158,14 @@ describe 'EPP Helper', epp: true do
</epp>
').to_s.squish
generated = Nokogiri::XML(domain_info_xml(name_value: 'one.ee', name_hosts: 'sub', pw: 'b3rafsla')).to_s.squish
xml = domain_info_xml({
name: { value: 'one.ee', attrs: { hosts: 'sub' } },
authInfo: {
pw: { value: 'b3rafsla' }
}
})
generated = Nokogiri::XML(xml).to_s.squish
expect(generated).to eq(expected)
end