Polkadex
Polkadex copied to clipboard
Testing OCEX pallet
This PR adds unit tests for the OCEX pallet extrinsics
The unit tests failure for register_encalve
will be addressed in #482
Hey @serhii-temchenko the transfers are happening either using the Balances
pallet or Assets
pallet, Asserting balances would be like writing unit tests for these pallets and not related to our pallet. These pallets already have unit tests provided by Parity. It is redundant work basically.
Hey @serhii-temchenko the transfers are happening either using the
Balances
pallet orAssets
pallet, Asserting balances would be like writing unit tests for these pallets and not related to our pallet. These pallets already have unit tests provided by Parity. It is redundant work basically.
Hey @felixfaisal. I'm not saying to test all cases of underlying used third party library which making direct transactions, I'm saying that expected result should be tested, we need to test that transaction method was called, we are testing a "black box" code so we don't care about how it was implemented internally (with usage of third-party library or our concrete implementation). Basically if I will remove call of transaction method - tests will pass checks without failing and we don't need this. You can easily tests this cases, you have known balance before transaction, just run test and copy/paste account balance after transaction and hardcode expected value.
Balance assertions done, Please take a look @serhii-temchenko
@felixfaisal Please resolve conflicts.
@felixfaisal there are list of unresolved comments like this one. I assume that they are collapsed on your screen and you missed them? Please address all comments and if it was resolved - click Resolve Conversation
.
Added new commit to include RPC for withdrawal as it was a part of #483