mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 15:56:57 +00:00
Properly set transaction type via the transaction import api
This commit is contained in:
parent
e9a9045f39
commit
9cb66d5d62
@ -38,7 +38,7 @@ object ImporterAPI extends RestHelper with Loggable {
|
||||
*/
|
||||
case class ImporterBank(IBAN : String, national_identifier : String, name : String)
|
||||
|
||||
case class ImporterDetails(type_en : String, type_de : String, posted : ImporterDate,
|
||||
case class ImporterDetails(kind : String, posted : ImporterDate,
|
||||
completed : ImporterDate, new_balance : ImporterAmount, value : ImporterAmount,
|
||||
label : String)
|
||||
case class ImporterDate(`$dt` : Date) //format : "2012-01-04T18:06:22.000Z" (see tests)
|
||||
|
||||
@ -26,6 +26,8 @@ class ImporterTest extends ServerSetup with Loggable with DefaultConnectorTestSe
|
||||
val secretKeyHttpParamName = "secret"
|
||||
val secretKeyValue = Props.get("importer_secret").get
|
||||
|
||||
val dummyKind = "Transfer"
|
||||
|
||||
def fixture() = new {
|
||||
lazy val bank = createBank("a-bank")
|
||||
lazy val accountCurrency = "EUR"
|
||||
@ -79,8 +81,7 @@ class ImporterTest extends ServerSetup with Loggable with DefaultConnectorTestSe
|
||||
| }
|
||||
| },
|
||||
| "details": {
|
||||
| "type_en": "Transfer",
|
||||
| "type_de": "Überweisung",
|
||||
| "kind": "$dummyKind",
|
||||
| "label": "$dummyLabel"
|
||||
| "posted": {
|
||||
| "$$dt": "$startDateString"
|
||||
@ -134,6 +135,8 @@ class ImporterTest extends ServerSetup with Loggable with DefaultConnectorTestSe
|
||||
f
|
||||
}
|
||||
|
||||
t.transactionType should equal(dummyKind)
|
||||
|
||||
t.startDate should equal(importJsonDateFormat.parse(startDate))
|
||||
t.finishDate should equal(importJsonDateFormat.parse(endDate))
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user