Sha256: 0157b7ee640a98d2857b997a2838dc68ee05d20c89796dd9dfdd7035819b6660

Contents?: true

Size: 1.2 KB

Versions: 17

Compression:

Stored size: 1.2 KB

Contents

RSpec.describe Epics::HAA do

  let(:client) { Epics::Client.new( File.open(File.join( File.dirname(__FILE__), '..', 'fixtures', 'SIZBN001.key')), 'secret' , 'https://194.180.18.30/ebicsweb/ebicsweb', 'SIZBN001', 'EBIX', 'EBICS') }

  subject { described_class.new(client) }

  before do
    allow(subject).to receive(:nonce) { "95149241ead8ae7dbb72cabe966bf0e3" }
    allow(subject).to receive(:timestamp) { "2017-10-17T19:56:33Z" }
  end

  describe '#to_xml' do
    specify { expect(subject.to_xml).to be_a_valid_ebics_doc }

    describe 'validate against fixture' do
      let(:signature_order_data) { Nokogiri::XML(File.read(File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', 'haa.xml'))) }

      it "will match exactly" do
        expect(Nokogiri::XML(subject.to_xml)).to be_equivalent_to(signature_order_data)
      end
    end
  end

  describe '#to_receipt_xml' do
    describe 'validate against fixture' do
      let(:signature_order_data) { Nokogiri::XML(File.read(File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', 'haa_receipt.xml'))) }

      it "will match exactly" do
        expect(Nokogiri::XML(subject.to_receipt_xml)).to be_equivalent_to(signature_order_data)
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
epics-2.7.0 spec/orders/haa_spec.rb
epics-2.6.0 spec/orders/haa_spec.rb
epics-2.5.0 spec/orders/haa_spec.rb
epics-2.4.0 spec/orders/haa_spec.rb
epics-2.3.0 spec/orders/haa_spec.rb
epics-2.2.0 spec/orders/haa_spec.rb
epics-2.1.2 spec/orders/haa_spec.rb
epics-2.1.1 spec/orders/haa_spec.rb
epics-2.1.0 spec/orders/haa_spec.rb
epics-2.0.0 spec/orders/haa_spec.rb
epics-1.8.1 spec/orders/haa_spec.rb
epics-1.8.0 spec/orders/haa_spec.rb
epics-1.7.2 spec/orders/haa_spec.rb
epics-1.7.1 spec/orders/haa_spec.rb
epics-1.7.0 spec/orders/haa_spec.rb
epics-1.6.0 spec/orders/haa_spec.rb
epics-1.5.2 spec/orders/haa_spec.rb