mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
add test code about SetOption in toeknERC20.test
Signed-off-by: 5pecia1 <pdpxpd@gmail.com>
This commit is contained in:
parent
9b8f50e2d0
commit
ca5c16dbae
1 changed files with 10 additions and 0 deletions
|
|
@ -190,6 +190,16 @@ describe('Chaincode', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('#SetOption', () => {
|
||||
it('should work', async () => {
|
||||
const response = await token.SetOption(ctx, 'some name', 'some symbol', '2');
|
||||
sinon.assert.calledWith(mockStub.putState, 'name', Buffer.from('some name'));
|
||||
sinon.assert.calledWith(mockStub.putState, 'symbol', Buffer.from('some symbol'));
|
||||
sinon.assert.calledWith(mockStub.putState, 'decimals', Buffer.from('2'));
|
||||
expect(response).to.equals(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#Mint', () => {
|
||||
it('should add token to a new account and a new total supply', async () => {
|
||||
mockClientIdentity.getMSPID.returns('Org1MSP');
|
||||
|
|
|
|||
Loading…
Reference in a new issue