Sha256: 7dfa06f5b6759f7b22bf34d6aeceda64a72c28cec2b9aac634e610dddb5df643

Contents?: true

Size: 1.21 KB

Versions: 17

Compression:

Stored size: 1.21 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', RUBY_ENGINE, '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

17 entries across 17 versions & 1 rubygems

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