-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tobias Schoknecht
committed
Jun 3, 2024
1 parent
8fbd8a3
commit 510c3e6
Showing
6 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class Epics::C2S < Epics::CDB | ||
def order_attribute | ||
"DZHNN" | ||
end | ||
|
||
def order_type | ||
'C2S' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
RSpec.describe Epics::C2S 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') } | ||
let(:document) { File.read( File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', 'cdb.xml') ) } | ||
subject { described_class.new(client, document) } | ||
|
||
describe 'order attributes' do | ||
it { expect(subject.header.to_s).to include('<OrderAttribute>DZHNN</OrderAttribute>') } | ||
it { expect(subject.header.to_s).to include('<OrderType>C2S</OrderType>') } | ||
end | ||
|
||
describe '#to_xml' do | ||
specify { expect(subject.to_xml).to be_a_valid_ebics_doc } | ||
end | ||
|
||
describe '#to_transfer_xml' do | ||
before { subject.transaction_id = SecureRandom.hex(16) } | ||
|
||
specify { expect(subject.to_transfer_xml).to be_a_valid_ebics_doc } | ||
end | ||
end |