@@ -363,20 +363,11 @@ contract('UFragmentsPolicy:Rebase', async function (accounts) {
363363 before ( 'setup UFragmentsPolicy contract' , setupContracts ) ;
364364
365365 describe ( 'when the market oracle returns invalid data' , function ( ) {
366- it ( 'should fail ' , async function ( ) {
366+ it ( 'supply delta should equal zero ' , async function ( ) {
367367 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 ) ;
373370
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 ;
380371 } ) ;
381372 } ) ;
382373} ) ;
@@ -387,20 +378,11 @@ contract('UFragmentsPolicy:Rebase', async function (accounts) {
387378 describe ( 'when the cpi oracle returns invalid data' , function ( ) {
388379 it ( 'should fail' , async function ( ) {
389380 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 )
393383 } ) ;
394384 } ) ;
395385
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- } ) ;
404386} ) ;
405387
406388contract ( 'UFragmentsPolicy:Rebase' , async function ( accounts ) {
0 commit comments