forked from kewisch/sepa.js
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Raphael Moutard
committed
May 30, 2019
1 parent
82de276
commit ab40bbc
Showing
5 changed files
with
3,159 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const Sepa = require('../sepa'); | ||
|
||
const SEPA_TYPE = 'pain.001.001.03'; // Customer Credit Transfer Initiation V3 | ||
|
||
describe('SEPA lib', () => { | ||
|
||
it('should build a valid simple sepa XML', async () => { | ||
const doc = new Sepa.Document(SEPA_TYPE); | ||
|
||
doc.grpHdr.id = 'ID_1'; | ||
doc.grpHdr.created = new Date(); | ||
doc.grpHdr.initiatorName = 'SPENDESK'; | ||
const xmlString = doc.toString(); | ||
expect(xmlString).toMatch(/<\?xml version="1.0" encoding="UTF-8"\?>/); | ||
// Correctly build the initiatorName | ||
expect(xmlString).toMatch(/SPENDESK/); | ||
}); | ||
}); |
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
Oops, something went wrong.