Skip to content

Commit

Permalink
Remove hard-coded indices from pallet-xcm tests (#4248)
Browse files Browse the repository at this point in the history
# ISSUE
- Link to issue: #4237

# DESCRIPTION
Remove all ModuleError with hard-coded indices to pallet Error. For
example:
```rs
Err(DispatchError::Module(ModuleError {
	index: 4,
	error: [2, 0, 0, 0],
	message: Some("Filtered")
}))
```
To 
```rs
let expected_result = Err(crate::Error::<Test>::Filtered.into());
assert_eq!(result, expected_result);
```
# TEST OUTCOME
```
test result: ok. 74 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
```

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
chungquantin and ggwpez authored Apr 29, 2024
1 parent 92a348f commit f34d8e3
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 184 deletions.
Loading

0 comments on commit f34d8e3

Please sign in to comment.