@@ -439,7 +439,7 @@ contract('Linguo', function(accounts) {
439439 // add a small amount because javascript can have small deviations up to several hundreds when operating with large numbers
440440 const challengerDeposit =
441441 ( await linguo . getChallengeValue ( 0 ) ) . toNumber ( ) + 1000
442- await linguo . challengeTranslation ( 0 , {
442+ await linguo . challengeTranslation ( 0 , '' , {
443443 from : challenger ,
444444 value : challengerDeposit
445445 } )
@@ -461,17 +461,51 @@ contract('Linguo', function(accounts) {
461461 // add a small amount because javascript can have small deviations up to several hundreds when operating with large numbers
462462 const challengerDeposit =
463463 ( await linguo . getChallengeValue ( 0 ) ) . toNumber ( ) + 1000
464- const challengeTx = await linguo . challengeTranslation ( 0 , {
465- from : challenger ,
466- value : challengerDeposit
467- } )
464+ const challengeTx = await linguo . challengeTranslation (
465+ 0 ,
466+ 'ChallengeEvidence' ,
467+ {
468+ from : challenger ,
469+ value : challengerDeposit
470+ }
471+ )
468472
469473 assert . equal (
470474 challengeTx . logs [ 1 ] . event ,
471475 'TranslationChallenged' ,
472476 'TranslationChallenged event was not emitted'
473477 )
474478
479+ assert . equal (
480+ challengeTx . logs [ 2 ] . event ,
481+ 'Evidence' ,
482+ 'Evidence event was not emitted'
483+ )
484+
485+ assert . equal (
486+ challengeTx . logs [ 2 ] . args . _arbitrator ,
487+ arbitrator . address ,
488+ 'The Evidence event has wrong arbitrator'
489+ )
490+
491+ assert . equal (
492+ challengeTx . logs [ 2 ] . args . _evidenceGroupID . toNumber ( ) ,
493+ 0 ,
494+ 'The Evidence event has wrong evidenceGroupID'
495+ )
496+
497+ assert . equal (
498+ challengeTx . logs [ 2 ] . args . _party ,
499+ challenger ,
500+ 'The Evidence event has wrong party address'
501+ )
502+
503+ assert . equal (
504+ challengeTx . logs [ 2 ] . args . _evidence ,
505+ 'ChallengeEvidence' ,
506+ 'The Evidence event has wrong evidence string'
507+ )
508+
475509 // get task info again because of updated values
476510 task = await linguo . tasks ( 0 )
477511 const taskInfo = await linguo . getTaskParties ( 0 )
@@ -519,7 +553,7 @@ contract('Linguo', function(accounts) {
519553 const challengerDeposit =
520554 arbitrationFee + ( challengeMultiplier * price ) / MULTIPLIER_DIVISOR + 1000
521555 await expectThrow (
522- linguo . challengeTranslation ( 0 , {
556+ linguo . challengeTranslation ( 0 , '' , {
523557 from : challenger ,
524558 value : challengerDeposit
525559 } )
@@ -540,7 +574,7 @@ contract('Linguo', function(accounts) {
540574 // add a small amount because javascript can have small deviations up to several hundreds when operating with large numbers
541575 const challengerDeposit =
542576 ( await linguo . getChallengeValue ( 0 ) ) . toNumber ( ) + 1000
543- await linguo . challengeTranslation ( 0 , {
577+ await linguo . challengeTranslation ( 0 , '' , {
544578 from : challenger ,
545579 value : challengerDeposit
546580 } )
@@ -597,7 +631,7 @@ contract('Linguo', function(accounts) {
597631 // add a small amount because javascript can have small deviations up to several hundreds when operating with large numbers
598632 const challengerDeposit =
599633 ( await linguo . getChallengeValue ( 0 ) ) . toNumber ( ) + 1000
600- await linguo . challengeTranslation ( 0 , {
634+ await linguo . challengeTranslation ( 0 , '' , {
601635 from : challenger ,
602636 value : challengerDeposit
603637 } )
@@ -654,7 +688,7 @@ contract('Linguo', function(accounts) {
654688 // add a small amount because javascript can have small deviations up to several hundreds when operating with large numbers
655689 const challengerDeposit =
656690 ( await linguo . getChallengeValue ( 0 ) ) . toNumber ( ) + 1000
657- await linguo . challengeTranslation ( 0 , {
691+ await linguo . challengeTranslation ( 0 , '' , {
658692 from : challenger ,
659693 value : challengerDeposit
660694 } )
@@ -707,7 +741,7 @@ contract('Linguo', function(accounts) {
707741 // add a small amount because javascript can have small deviations up to several hundreds when operating with large numbers
708742 const challengerDeposit =
709743 ( await linguo . getChallengeValue ( 0 ) ) . toNumber ( ) + 1000
710- await linguo . challengeTranslation ( 0 , {
744+ await linguo . challengeTranslation ( 0 , '' , {
711745 from : challenger ,
712746 value : challengerDeposit
713747 } )
@@ -824,7 +858,7 @@ contract('Linguo', function(accounts) {
824858 // add a small amount because javascript can have small deviations up to several hundreds when operating with large numbers
825859 const challengerDeposit =
826860 ( await linguo . getChallengeValue ( 0 ) ) . toNumber ( ) + 1000
827- await linguo . challengeTranslation ( 0 , {
861+ await linguo . challengeTranslation ( 0 , '' , {
828862 from : challenger ,
829863 value : challengerDeposit
830864 } )
@@ -850,7 +884,7 @@ contract('Linguo', function(accounts) {
850884 // add a small amount because javascript can have small deviations up to several hundreds when operating with large numbers
851885 const challengerDeposit =
852886 ( await linguo . getChallengeValue ( 0 ) ) . toNumber ( ) + 1000
853- await linguo . challengeTranslation ( 0 , {
887+ await linguo . challengeTranslation ( 0 , '' , {
854888 from : challenger ,
855889 value : challengerDeposit
856890 } )
@@ -878,7 +912,7 @@ contract('Linguo', function(accounts) {
878912 // add a small amount because javascript can have small deviations up to several hundreds when operating with large numbers
879913 const challengerDeposit =
880914 ( await linguo . getChallengeValue ( 0 ) ) . toNumber ( ) + 1000
881- await linguo . challengeTranslation ( 0 , {
915+ await linguo . challengeTranslation ( 0 , '' , {
882916 from : challenger ,
883917 value : challengerDeposit
884918 } )
@@ -943,7 +977,7 @@ contract('Linguo', function(accounts) {
943977 // add a small amount because javascript can have small deviations up to several hundreds when operating with large numbers
944978 const challengerDeposit =
945979 ( await linguo . getChallengeValue ( 0 ) ) . toNumber ( ) + 1000
946- await linguo . challengeTranslation ( 0 , {
980+ await linguo . challengeTranslation ( 0 , '' , {
947981 from : challenger ,
948982 value : challengerDeposit
949983 } )
@@ -1044,7 +1078,7 @@ contract('Linguo', function(accounts) {
10441078 // add a small amount because javascript can have small deviations up to several hundreds when operating with large numbers
10451079 const challengerDeposit =
10461080 ( await linguo . getChallengeValue ( 0 ) ) . toNumber ( ) + 1000
1047- await linguo . challengeTranslation ( 0 , {
1081+ await linguo . challengeTranslation ( 0 , '' , {
10481082 from : challenger ,
10491083 value : challengerDeposit
10501084 } )
@@ -1127,7 +1161,7 @@ contract('Linguo', function(accounts) {
11271161 // add a small amount because javascript can have small deviations up to several hundreds when operating with large numbers
11281162 const challengerDeposit =
11291163 ( await linguo . getChallengeValue ( 0 ) ) . toNumber ( ) + 1000
1130- await linguo . challengeTranslation ( 0 , {
1164+ await linguo . challengeTranslation ( 0 , '' , {
11311165 from : challenger ,
11321166 value : challengerDeposit
11331167 } )
0 commit comments