difftreelog
Update contracts tests
in: master
2 files changed
tests/src/contracts.test.tsdiffbeforeafterboth--- a/tests/src/contracts.test.ts
+++ b/tests/src/contracts.test.ts
@@ -89,14 +89,15 @@
return (result.result.asSuccess.data[0] == 0x00) ? false : true;
}
-describe('Contracts smoke test', () => {
+describe('Contracts', () => {
it(`Can deploy smart contract Flipper, instantiate it and call it's get and flip messages.`, async () => {
await usingApi(async api => {
const [contract, deployer] = await deployFlipper(api);
const initialGetResponse = await getFlipValue(contract, deployer);
+ const bob = privateKey("//Bob");
const flip = contract.exec('flip', value, gasLimit);
- await submitTransactionAsync(deployer, flip);
+ await submitTransactionAsync(bob, flip);
const afterFlipGetResponse = await getFlipValue(contract, deployer);
expect(afterFlipGetResponse).not.to.be.eq(initialGetResponse, 'Flipping should change value.');
tests/src/createItem.test.tsdiffbeforeafterboth8 createItemExpectSuccess
8 createItemExpectSuccess
9} from './util/helpers';
9} from './util/helpers';
10
10
11describe.only('integration test: ext. createItem():', () => {
11describe('integration test: ext. createItem():', () => {
12 it('Create new item in NFT collection', async () => {
12 it('Create new item in NFT collection', async () => {
13 const createMode = 'NFT';
13 const createMode = 'NFT';
14 const newCollectionID = await createCollectionExpectSuccess('0', '0', '0', createMode);
14 const newCollectionID = await createCollectionExpectSuccess('0', '0', '0', createMode);