forked from unimatrix/web
Expand public tariffs with tax rules, reserve instruments and economic formulas; add complete PDF and audited direct publisher
This commit is contained in:
parent
857cdf5d6f
commit
8eca3945ba
1 changed files with 189 additions and 10 deletions
|
|
@ -17,3 +17,9 @@ test('expiry, tampering and unavailable developer privileges reject before execu
|
|||
now=10100;await assert.rejects(service.verify(dev,issued.key,manifest),/unavailable/);
|
||||
await assert.rejects(setup({authorize:async()=>false}).issue(dev,manifest),/Developer access/);
|
||||
});
|
||||
test('tariff publication keys bind exact public file hashes and reject unrelated developer actions',async()=>{
|
||||
const service=setup(),publication={action:'tariff-publication',state:'planned',files:[{path:'/rates-and-charges.html',sha256:'ab'.repeat(32)}],changesBalances:false};
|
||||
const issued=await service.issue(dev,publication);assert.equal((await service.verify(dev,issued.key,publication)).manifest.changesBalances,false);
|
||||
await assert.rejects(service.verify(dev,issued.key,{...publication,files:[{path:'/other.html',sha256:'ab'.repeat(32)}]}),/manifest/);
|
||||
await assert.rejects(service.issue(dev,{action:'arbitrary-sql',state:'planned'}),/Invalid developer batch/);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff