From 9e61518ead7ceef38193970c3a311133c0421de8 Mon Sep 17 00:00:00 2001 From: Evgeniy Abramov Date: Thu, 23 Nov 2023 13:54:25 +0400 Subject: [PATCH] chore: add test for re-enable coinomics --- x/coinomics/keeper/integration_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/x/coinomics/keeper/integration_test.go b/x/coinomics/keeper/integration_test.go index ec5793e5..2beb6c77 100644 --- a/x/coinomics/keeper/integration_test.go +++ b/x/coinomics/keeper/integration_test.go @@ -285,6 +285,20 @@ var _ = Describe("Coinomics", Ordered, func() { totalSupplyAfterCommits = s.app.BankKeeper.GetSupply(s.ctx, denomMint) Expect(maxSupply.Amount).To(Equal(totalSupplyAfterCommits.Amount)) + + // check: not mint if coinomics enables back + params := s.app.CoinomicsKeeper.GetParams(s.ctx) + params.EnableCoinomics = true + + s.app.CoinomicsKeeper.SetParams(s.ctx, params) + + s.Commit(10) + + totalSupplyAfterCommits = s.app.BankKeeper.GetSupply(s.ctx, denomMint) + paramsAfterCommits = s.app.CoinomicsKeeper.GetParams(s.ctx) + + Expect(maxSupply.Amount).To(Equal(totalSupplyAfterCommits.Amount)) + Expect(paramsAfterCommits.EnableCoinomics).To(Equal(false)) }) }) })