@@ -182,12 +182,14 @@ mod tests {
182182 use crate :: mock:: { Attestation , ExtBuilder , Origin , System , Test , TestEvent } ;
183183 use frame_support:: { assert_noop, assert_ok} ;
184184
185+ type AccountId = <Test as frame_system:: Trait >:: AccountId ;
186+
185187 #[ test]
186188 fn initialize_holder_has_no_claims ( ) {
187189 let holder = 0xbaa ;
188190 ExtBuilder :: build ( ) . execute_with ( || {
189191 // Note: without any valid issuers, there is no valid input for topics or value
190- assert_eq ! ( Attestation :: issuers( holder) , [ ] ) ;
192+ assert_eq ! ( Attestation :: issuers( holder) , < Vec < AccountId >> :: new ( ) ) ;
191193 } )
192194 }
193195
@@ -304,7 +306,7 @@ mod tests {
304306 assert_ok ! ( result_add) ;
305307 assert_ok ! ( result_remove) ;
306308
307- assert_eq ! ( Attestation :: issuers( holder) , [ ] ) ;
309+ assert_eq ! ( Attestation :: issuers( holder) , < Vec < AccountId >> :: new ( ) ) ;
308310 assert_eq ! ( Attestation :: topics( ( holder, issuer) ) , [ ] ) ;
309311 assert_eq ! ( Attestation :: value( ( holder, issuer, topic) ) , invalid_value) ;
310312 } )
@@ -384,7 +386,7 @@ mod tests {
384386 assert_ok ! ( result_remove_food) ;
385387 assert_ok ! ( result_remove_loot) ;
386388
387- assert_eq ! ( Attestation :: issuers( holder) , [ ] ) ;
389+ assert_eq ! ( Attestation :: issuers( holder) , < Vec < AccountId >> :: new ( ) ) ;
388390 assert_eq ! ( Attestation :: topics( ( holder, issuer) ) , [ ] ) ;
389391 assert_eq ! ( Attestation :: value( ( holder, issuer, topic_food) ) , invalid_value) ;
390392 assert_eq ! ( Attestation :: value( ( holder, issuer, topic_loot) ) , invalid_value) ;
@@ -411,6 +413,7 @@ mod tests {
411413 let topic = AttestationTopic :: from ( 0xf00d ) ;
412414 let value = AttestationValue :: from ( 0xb33f ) ;
413415 ExtBuilder :: build ( ) . execute_with ( || {
416+ System :: set_block_number ( 1 ) ;
414417 assert_ok ! ( Attestation :: set_claim( Origin :: signed( issuer) , holder, topic, value) ) ;
415418
416419 let expected_event = TestEvent :: attestation ( RawEvent :: ClaimCreated ( holder, issuer, topic, value) ) ;
@@ -426,6 +429,7 @@ mod tests {
426429 let topic = AttestationTopic :: from ( 0xf00d ) ;
427430 let value = AttestationValue :: from ( 0xb33f ) ;
428431 ExtBuilder :: build ( ) . execute_with ( || {
432+ System :: set_block_number ( 1 ) ;
429433 assert_ok ! ( Attestation :: set_claim( Origin :: signed( issuer) , holder, topic, value) ) ;
430434 assert_ok ! ( Attestation :: remove_claim( Origin :: signed( issuer) , holder, topic) ) ;
431435
@@ -443,6 +447,7 @@ mod tests {
443447 let value_old = AttestationValue :: from ( 0xb33f ) ;
444448 let value_new = AttestationValue :: from ( 0xcabba93 ) ;
445449 ExtBuilder :: build ( ) . execute_with ( || {
450+ System :: set_block_number ( 1 ) ;
446451 assert_ok ! ( Attestation :: set_claim( Origin :: signed( issuer) , holder, topic, value_old) ) ;
447452 assert_ok ! ( Attestation :: set_claim( Origin :: signed( issuer) , holder, topic, value_new) ) ;
448453
0 commit comments