Files
numscript/internal/interpreter/testdata/numscript-cookbook/send-max.num.specs.json

34 lines
723 B
JSON

{
"$schema": "https://raw.githubusercontent.com/formancehq/numscript/main/specs.schema.json",
"testCases": [
{
"it": "is capped to USD100 when balance is higher",
"balances": {
"src": { "USD": 999 }
},
"expect.postings": [
{
"source": "src",
"destination": "dest",
"amount": 100,
"asset": "USD"
}
]
},
{
"it": "allows sending less than the cap when balance is not enough",
"balances": {
"src": { "USD": 42 }
},
"expect.postings": [
{
"source": "src",
"destination": "dest",
"amount": 42,
"asset": "USD"
}
]
}
]
}