Skip to content

Commit

Permalink
Merge pull request #359 from mangata-finance/feature/soloToken-promot…
Browse files Browse the repository at this point in the history
…ion-forbiden

create test for checking ban on soloToken's promotion
  • Loading branch information
AlexChetverov authored Dec 15, 2023
2 parents 7393a17 + 06f12c3 commit 9f0bac2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/parallel/xyk-pallet.API.poolLiqidity.activateLiqudity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
import { AssetWallet, User } from "../../utils/User";
import { getEnvironmentRequiredVars } from "../../utils/utils";
import { Xyk } from "../../utils/xyk";
import { waitSudoOperationFail } from "../../utils/eventListeners";

jest.spyOn(console, "log").mockImplementation(jest.fn());
jest.setTimeout(2500000);
Expand Down Expand Up @@ -80,6 +81,15 @@ beforeAll(async () => {
testUser1.addAsset(liqIdPromPool);
});

test("GIVEN a proofOfStake.updatePoolPromotion WHEN the liq token is a regular token, extrinsic fail", async () => {
const promotionSoloToken = await Sudo.batchAsSudoFinalized(
Assets.promotePool(token1.toNumber(), 20),
);
await waitSudoOperationFail(promotionSoloToken, [
"SoloTokenPromotionForbiddenError",
]);
});

test("Check that a user that deactivate some tokens, put liquidity tokens from frozen to free, then activate some tokens and put liquidity tokens from free to frozen", async () => {
await mintLiquidity(
testUser1.keyRingPair,
Expand Down

0 comments on commit 9f0bac2

Please sign in to comment.