# encoding: utf-8
describe Cieloz::RequisicaoCaptura do
let(:_) { subject.class }
let(:dir) { File.dirname __FILE__ }
let(:opts) { { root: "requisicao-captura" } }
let(:ec) { _::DadosEc.new Cieloz::Homologacao::Credenciais::CIELO }
it "serializes tid" do
tid = 12345
subject.tid = tid
assert_equal expected_xml(opts) { "#{tid}" }, subject.to_xml
end
it "serializes dados-ec" do
subject.dados_ec = ec
assert_equal expected_xml(opts) { xml_for :ec, dir, binding }, subject.to_xml
end
it "serializes valor" do
val = 123
subject.valor = val
assert_equal expected_xml(opts) { "#{val}" }, subject.to_xml
end
end