diff --git a/radix-engine-tests/tests/component.rs b/radix-engine-tests/tests/component.rs index a5010cac50f..74eb6cb53db 100644 --- a/radix-engine-tests/tests/component.rs +++ b/radix-engine-tests/tests/component.rs @@ -115,112 +115,6 @@ fn blueprint_name_can_be_obtained_from_a_method() { assert_eq!(blueprint_name, "ComponentTest") } -#[test] -fn pass_bucket_to_other_component() { - let mut test_runner = TestRunnerBuilder::new().build(); - let package_address = test_runner.publish_package_simple(PackageLoader::get("component")); - - // create two components - let receipt = test_runner.execute_manifest( - ManifestBuilder::new() - .lock_fee_from_faucet() - .call_function( - package_address, - "ComponentTest", - "create_component", - manifest_args!(), - ) - .call_function( - package_address, - "ComponentTest", - "create_component", - manifest_args!(), - ) - .build(), - vec![], - ); - let result = receipt.expect_commit_success(); - - let component_address_1 = result.new_component_addresses()[0]; - let component_address_2 = result.new_component_addresses()[1]; - let resource_address_1 = result.new_resource_addresses()[0]; - - // take bucket with resources from component 1 and pass it to the component 2 - // which burns it - let receipt = test_runner.execute_manifest( - ManifestBuilder::new() - .lock_fee_from_faucet() - .call_method(component_address_1, "put_component_state", manifest_args!()) - .take_all_from_worktop(resource_address_1, "bucket_name") - .call_method_with_name_lookup(component_address_2, "burn_bucket", |lookup| { - (lookup.bucket("bucket_name"),) - }) - .build(), - vec![], - ); - - // verify if manifest executed with success - receipt.expect_commit_success(); -} - -#[test] -fn pass_proof_to_other_component() { - let mut test_runner = TestRunnerBuilder::new().build(); - let package_address = test_runner.publish_package_simple(PackageLoader::get("component")); - - // create 1st component - let receipt = test_runner.execute_manifest( - ManifestBuilder::new() - .lock_fee_from_faucet() - .call_function( - package_address, - "ComponentTest2", - "create_component", - manifest_args!(), - ) - .build(), - vec![], - ); - let result = receipt.expect_commit_success(); - - let component_address_1 = result.new_component_addresses().first().cloned().unwrap(); - let resource_address_1 = result.new_resource_addresses().first().cloned().unwrap(); - - // create 2nd component passing resource address from 1st component - let receipt = test_runner.execute_manifest( - ManifestBuilder::new() - .lock_fee_from_faucet() - .call_function( - package_address, - "ComponentTest3", - "create_component", - manifest_args!(resource_address_1), - ) - .build(), - vec![], - ); - let result = receipt.expect_commit_success(); - let component_address_2 = result.new_component_addresses().first().cloned().unwrap(); - - // take buckate and proof from the 1st component and pass - // to the 2nd component for resource address validation - let receipt = test_runner.execute_manifest( - ManifestBuilder::new() - .lock_fee_from_faucet() - .call_method(component_address_1, "generate_nft_proof", manifest_args!()) - .pop_from_auth_zone("proof_1") - .call_method_with_name_lookup(component_address_2, "check_proof", |lookup| { - (lookup.proof("proof_1"),) - }) - .burn_all_from_worktop(resource_address_1) // resources from bucket returned by generate_nft_proof() - .build(), - vec![], - ); - - // verify if manifest executed with success - receipt.expect_commit_success(); -} - #[test] fn pass_bucket_and_proof_to_other_component() { let mut test_runner = TestRunnerBuilder::new().build();