@@ -363,20 +363,11 @@ contract('UFragmentsPolicy:Rebase', async function (accounts) {
363
363
before ( 'setup UFragmentsPolicy contract' , setupContracts ) ;
364
364
365
365
describe ( 'when the market oracle returns invalid data' , function ( ) {
366
- it ( 'should fail ' , async function ( ) {
366
+ it ( 'supply delta should equal zero ' , async function ( ) {
367
367
await mockExternalData ( INITIAL_RATE_30P_MORE , INITIAL_CPI , 1000 , false ) ;
368
- expect (
369
- await chain . isEthException ( uFragmentsPolicy . rebase ( ) )
370
- ) . to . be . true ;
371
- } ) ;
372
- } ) ;
368
+ r = await uFragmentsPolicy . rebase ( ) ;
369
+ r . logs [ 0 ] . args . requestedSupplyAdjustment . should . be . bignumber . eq ( 0 ) ;
373
370
374
- describe ( 'when the market oracle returns valid data' , function ( ) {
375
- it ( 'should NOT fail' , async function ( ) {
376
- await mockExternalData ( INITIAL_RATE_30P_MORE , INITIAL_CPI , 1000 , true ) ;
377
- expect (
378
- await chain . isEthException ( uFragmentsPolicy . rebase ( ) )
379
- ) . to . be . false ;
380
371
} ) ;
381
372
} ) ;
382
373
} ) ;
@@ -387,20 +378,11 @@ contract('UFragmentsPolicy:Rebase', async function (accounts) {
387
378
describe ( 'when the cpi oracle returns invalid data' , function ( ) {
388
379
it ( 'should fail' , async function ( ) {
389
380
await mockExternalData ( INITIAL_RATE_30P_MORE , INITIAL_CPI , 1000 , true , false ) ;
390
- expect (
391
- await chain . isEthException ( uFragmentsPolicy . rebase ( ) )
392
- ) . to . be . true ;
381
+ r = await uFragmentsPolicy . rebase ( ) ;
382
+ r . logs [ 0 ] . args . requestedSupplyAdjustment . should . be . bignumber . eq ( 0 )
393
383
} ) ;
394
384
} ) ;
395
385
396
- describe ( 'when the cpi oracle returns valid data' , function ( ) {
397
- it ( 'should NOT fail' , async function ( ) {
398
- await mockExternalData ( INITIAL_RATE_30P_MORE , INITIAL_CPI , 1000 , true , true ) ;
399
- expect (
400
- await chain . isEthException ( uFragmentsPolicy . rebase ( ) )
401
- ) . to . be . false ;
402
- } ) ;
403
- } ) ;
404
386
} ) ;
405
387
406
388
contract ( 'UFragmentsPolicy:Rebase' , async function ( accounts ) {
0 commit comments