Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage test: coins tests #613

Merged
merged 4 commits into from
Jul 1, 2022
Merged

Coverage test: coins tests #613

merged 4 commits into from
Jul 1, 2022

Conversation

hieuvubk
Copy link
Contributor

This Pr is to add the test case in issue #497.
Now coins tests available, I'll write more test for another tasks

Copy link

@mustafapylons mustafapylons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments, otherwise code is good.

@@ -47,3 +47,126 @@ func (suite *IntegrationTestSuite) TestMintCoinsToAddr() {
balance := bk.SpendableCoins(ctx, addr)
require.True(balance.IsEqual(mintAmt))
}

func (suite *IntegrationTestSuite) TestBurnCoins() {
// k, ctx := setupKeeper(t)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove dead code?

}

func (suite *IntegrationTestSuite) TestBurnCoinsFromAddress() {
// k, ctx := setupKeeper(t)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dead code as well

}

func (suite *IntegrationTestSuite) TestMintCreditToAddr() {
// k, ctx := setupKeeper(t)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dead code can be removed as well

}

func (suite *IntegrationTestSuite) TestSendRewardsFromFeeCollector() {
// k, ctx := setupKeeper(t)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dead code can be removed as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link

@mustafapylons mustafapylons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more typo, otherwise it's good.

err := k.MintCoins(ctx, types.PaymentsProcessorName, mintAmt)
require.NoError(err)

// PaymentsProcessor account has buner permissions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"PaymentsProcessor account has burner permissions" would be the right comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my mistake 😭

Copy link

@mustafapylons mustafapylons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now.

@faddat faddat merged commit be5d1b9 into main Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants