|
18 | 18 |
|
19 | 19 | use crate::setup::*;
|
20 | 20 |
|
21 |
| -use cumulus_primitives_core::Parent; |
22 | 21 | use cumulus_primitives_core::Unlimited;
|
23 |
| -use sp_runtime::traits::Zero; |
| 22 | +use sp_runtime::traits::{BlakeTwo256, Hash, Zero}; |
24 | 23 | use xcm::{
|
25 | 24 | v4::{
|
26 | 25 | Asset as XcmAsset, AssetId as XcmAssetId, Fungibility, Junction, Junctions::*, Location,
|
@@ -203,16 +202,20 @@ fn query_delivery_fees_is_ok() {
|
203 | 202 | #[test]
|
204 | 203 | fn dry_run_call_is_ok() {
|
205 | 204 | new_test_ext().execute_with(|| {
|
206 |
| - let origin = OriginCaller::system(frame_system::RawOrigin::Root.into()); |
| 205 | + let origin = OriginCaller::system(frame_system::RawOrigin::Signed(ALICE.clone()).into()); |
207 | 206 | // TODO: Improve this test using an XCM call with more side effects and compare local_xcm with recorded one to get ride of `xcm_recorder_configuration_is_ok` test
|
208 |
| - let call = RuntimeCall::System(frame_system::Call::remark { |
| 207 | + let call = RuntimeCall::System(frame_system::Call::remark_with_event { |
209 | 208 | remark: vec![0u8; 32],
|
210 | 209 | });
|
211 | 210 |
|
212 | 211 | let result = Runtime::dry_run_call(origin, call).expect("Must return some effects.");
|
| 212 | + assert_eq!(result.forwarded_xcms, vec![]); |
213 | 213 | assert_eq!(
|
214 |
| - result.forwarded_xcms, |
215 |
| - vec![(VersionedLocation::from((Parent, Here)), vec![],),] |
| 214 | + result.emitted_events[0], |
| 215 | + RuntimeEvent::System(frame_system::Event::Remarked { |
| 216 | + sender: ALICE.into(), |
| 217 | + hash: BlakeTwo256::hash_of(&[0u8; 32]).into(), |
| 218 | + }), |
216 | 219 | );
|
217 | 220 | })
|
218 | 221 | }
|
@@ -253,10 +256,7 @@ fn dry_run_xcm_is_ok() {
|
253 | 256 | let result = Runtime::dry_run_xcm(origin_location, versioned_xcm)
|
254 | 257 | .expect("Must return some effects.");
|
255 | 258 |
|
256 |
| - assert_eq!( |
257 |
| - result.forwarded_xcms, |
258 |
| - vec![(VersionedLocation::from((Parent, Here)), vec![],),] |
259 |
| - ); |
| 259 | + assert_eq!(result.forwarded_xcms, vec![]); |
260 | 260 |
|
261 | 261 | assert_eq!(
|
262 | 262 | result.emitted_events[0],
|
|
0 commit comments