@@ -324,12 +324,7 @@ describe('MedianOracle:getData', async function () {
324324 await oracle . connect ( A ) . pushReport ( BigNumber . from ( '1053200000000000000' ) )
325325 await increaseTime ( 10 )
326326 } )
327-
328- it ( 'should emit ReportTimestampOutOfRange message' , async function ( ) {
329- await expect ( oracle . getData ( ) )
330- . to . emit ( oracle , 'ReportTimestampOutOfRange' )
331- . withArgs ( await C . getAddress ( ) )
332- } )
327+
333328 it ( 'should calculate the exchange rate' , async function ( ) {
334329 await expect ( callerContract . getData ( ) )
335330 . to . emit ( callerContract , 'ReturnValueUInt256Bool' )
@@ -355,12 +350,7 @@ describe('MedianOracle:getData', async function () {
355350 await increaseTime ( 10 )
356351 await oracle . connect ( B ) . pushReport ( BigNumber . from ( '1041000000000000000' ) )
357352 } )
358-
359- it ( 'should emit ReportTimestampOutOfRange message' , async function ( ) {
360- await expect ( oracle . getData ( ) )
361- . to . emit ( oracle , 'ReportTimestampOutOfRange' )
362- . withArgs ( await B . getAddress ( ) )
363- } )
353+
364354 it ( 'should calculate the exchange rate' , async function ( ) {
365355 await expect ( callerContract . getData ( ) )
366356 . to . emit ( callerContract , 'ReturnValueUInt256Bool' )
@@ -389,12 +379,7 @@ describe('MedianOracle:getData', async function () {
389379 await increaseTime ( 10 )
390380 await oracle . connect ( B ) . pushReport ( BigNumber . from ( '1041000000000000000' ) )
391381 } )
392-
393- it ( 'should emit ReportTimestampOutOfRange message' , async function ( ) {
394- await expect ( oracle . getData ( ) )
395- . to . emit ( oracle , 'ReportTimestampOutOfRange' )
396- . withArgs ( await B . getAddress ( ) )
397- } )
382+
398383 it ( 'should not have a valid result' , async function ( ) {
399384 await expect ( callerContract . getData ( ) )
400385 . to . emit ( callerContract , 'ReturnValueUInt256Bool' )
@@ -417,19 +402,7 @@ describe('MedianOracle:getData', async function () {
417402
418403 await increaseTime ( 61 )
419404 } )
420-
421- it ( 'should emit 2 ReportTimestampOutOfRange messages' , async function ( ) {
422- const tx = await oracle . getData ( )
423- const txReceipt = await tx . wait ( )
424- const txEvents = txReceipt . events ?. filter ( ( x : any ) => {
425- return x . event == 'ReportTimestampOutOfRange'
426- } )
427- expect ( txEvents . length ) . to . equal ( 2 )
428- const eventA = txEvents [ 0 ]
429- expect ( eventA . args . provider ) . to . equal ( await A . getAddress ( ) )
430- const eventB = txEvents [ 1 ]
431- expect ( eventB . args . provider ) . to . equal ( await B . getAddress ( ) )
432- } )
405+
433406 it ( 'should return false and 0' , async function ( ) {
434407 await expect ( callerContract . getData ( ) )
435408 . to . emit ( callerContract , 'ReturnValueUInt256Bool' )
@@ -451,11 +424,6 @@ describe('MedianOracle:getData', async function () {
451424 } )
452425
453426 describe ( 'when recent is too recent and past is too old' , function ( ) {
454- it ( 'should emit ReportTimestampOutOfRange message' , async function ( ) {
455- await expect ( oracle . getData ( ) )
456- . to . emit ( oracle , 'ReportTimestampOutOfRange' )
457- . withArgs ( await A . getAddress ( ) )
458- } )
459427 it ( 'should fail' , async function ( ) {
460428 await expect ( callerContract . getData ( ) )
461429 . to . emit ( callerContract , 'ReturnValueUInt256Bool' )
@@ -478,11 +446,6 @@ describe('MedianOracle:getData', async function () {
478446 } )
479447
480448 describe ( 'when recent is too recent and past is too recent' , function ( ) {
481- it ( 'should emit ReportTimestampOutOfRange message' , async function ( ) {
482- await expect ( oracle . getData ( ) )
483- . to . emit ( oracle , 'ReportTimestampOutOfRange' )
484- . withArgs ( await A . getAddress ( ) )
485- } )
486449 it ( 'should fail' , async function ( ) {
487450 await expect ( callerContract . getData ( ) )
488451 . to . emit ( callerContract , 'ReturnValueUInt256Bool' )
0 commit comments