Merged
Conversation
eaa935c to
9ac43a4
Compare
ntn-x2
reviewed
Nov 6, 2024
pallets/pallet-bonded-coins/src/tests/transactions/create_pool.rs
Outdated
Show resolved
Hide resolved
pallets/pallet-bonded-coins/src/tests/transactions/create_pool.rs
Outdated
Show resolved
Hide resolved
pallets/pallet-bonded-coins/src/tests/transactions/create_pool.rs
Outdated
Show resolved
Hide resolved
Ad96el
reviewed
Nov 6, 2024
|
|
||
| #[test] | ||
| fn multi_currency() { | ||
| let initial_balance = 100_000_000_000_000_000u128; |
Contributor
There was a problem hiding this comment.
Maybe move the balance to mock. It is used multiple times
| .with_collaterals(vec![DEFAULT_COLLATERAL_CURRENCY_ID]) | ||
| .build() | ||
| .execute_with(|| { | ||
| assert_eq!(NextAssetId::<Test>::get(), 0); |
Contributor
There was a problem hiding this comment.
Can we also check the deposit? We have checked it for a single currency. For multiple, it should differ.
Contributor
Author
There was a problem hiding this comment.
I can't seem to be able to link to the right line, but this is being checked with
assert_eq!(
Balances::free_balance(ACCOUNT_00),
initial_balance.sub(BondingPallet::calculate_pool_deposit(3))
);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
re/ KILTProtocol/ticket#3671
Adds unit tests for creating pools.
To be rebased and merged after #780
Tests currently failing (fix TBD in another PR):
ArithmeticError::OverflowChecklist:
array[3]useget(3), ...)