@@ -324,12 +324,7 @@ describe('MedianOracle:getData', async function () {
324
324
await oracle . connect ( A ) . pushReport ( BigNumber . from ( '1053200000000000000' ) )
325
325
await increaseTime ( 10 )
326
326
} )
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
+
333
328
it ( 'should calculate the exchange rate' , async function ( ) {
334
329
await expect ( callerContract . getData ( ) )
335
330
. to . emit ( callerContract , 'ReturnValueUInt256Bool' )
@@ -355,12 +350,7 @@ describe('MedianOracle:getData', async function () {
355
350
await increaseTime ( 10 )
356
351
await oracle . connect ( B ) . pushReport ( BigNumber . from ( '1041000000000000000' ) )
357
352
} )
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
+
364
354
it ( 'should calculate the exchange rate' , async function ( ) {
365
355
await expect ( callerContract . getData ( ) )
366
356
. to . emit ( callerContract , 'ReturnValueUInt256Bool' )
@@ -389,12 +379,7 @@ describe('MedianOracle:getData', async function () {
389
379
await increaseTime ( 10 )
390
380
await oracle . connect ( B ) . pushReport ( BigNumber . from ( '1041000000000000000' ) )
391
381
} )
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
+
398
383
it ( 'should not have a valid result' , async function ( ) {
399
384
await expect ( callerContract . getData ( ) )
400
385
. to . emit ( callerContract , 'ReturnValueUInt256Bool' )
@@ -417,19 +402,7 @@ describe('MedianOracle:getData', async function () {
417
402
418
403
await increaseTime ( 61 )
419
404
} )
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
+
433
406
it ( 'should return false and 0' , async function ( ) {
434
407
await expect ( callerContract . getData ( ) )
435
408
. to . emit ( callerContract , 'ReturnValueUInt256Bool' )
@@ -451,11 +424,6 @@ describe('MedianOracle:getData', async function () {
451
424
} )
452
425
453
426
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
- } )
459
427
it ( 'should fail' , async function ( ) {
460
428
await expect ( callerContract . getData ( ) )
461
429
. to . emit ( callerContract , 'ReturnValueUInt256Bool' )
@@ -478,11 +446,6 @@ describe('MedianOracle:getData', async function () {
478
446
} )
479
447
480
448
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
- } )
486
449
it ( 'should fail' , async function ( ) {
487
450
await expect ( callerContract . getData ( ) )
488
451
. to . emit ( callerContract , 'ReturnValueUInt256Bool' )
0 commit comments