Sha256: c223f2af8fd544248e50c7155ea68e32f22cf5c56a7212c1dba96e06d22f25c1

Contents?: true

Size: 1.2 KB

Versions: 13

Compression:

Stored size: 1.2 KB

Contents

RSpec.describe Epics::INI 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') }

  before { allow(subject).to receive(:timestamp) { "2014-10-10T11:16:00Z" } }

  subject { described_class.new(client) }

  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', 'ini.xml'))) }

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

  describe '#key_signature' do

    specify { expect(subject.key_signature).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', 'signature_pub_key_order_data.xml'))) }

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

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
epics-1.5.1 spec/orders/ini_spec.rb
epics-1.5.0 spec/orders/ini_spec.rb
epics-1.4.1 spec/orders/ini_spec.rb
epics-1.4.0 spec/orders/ini_spec.rb
epics-1.3.1 spec/orders/ini_spec.rb
epics-1.3.0 spec/orders/ini_spec.rb
epics-1.2.2 spec/orders/ini_spec.rb
epics-1.2.1 spec/orders/ini_spec.rb
epics-1.2.0 spec/orders/ini_spec.rb
epics-1.1.2 spec/orders/ini_spec.rb
epics-1.1.1 spec/orders/ini_spec.rb
epics-1.1.0 spec/orders/ini_spec.rb
epics-1.0.0 spec/orders/ini_spec.rb