An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
besu/acceptance-tests/truffle-pet-shop-tutorial/test/test2.js

25 lines
864 B

6 years ago
/* global artifacts contract describe assert it */
const TestAdoption = artifacts.require('Adoption.sol');
var proxy;
contract('Adoption 2', () => {
describe('Function: adopt pet 3', () => {
it('Should successfully adopt pet within range', async () => {
proxy = await TestAdoption.new();
await proxy.adopt(3);
assert(true, 'expected adoption of pet within range to succeed');
const isAdopted = await proxy.isAdopted(3);
assert.equal(isAdopted, true, 'expected pet 3 to be adopted (adopted in this test method)');
});
it('Pet 2 should NOT be adopted (was adopted in a different test file)', async () => {
// check status of pet2
const isAdopted = await proxy.isAdopted(2);
assert.equal(isAdopted, false, 'expected pet 2 to NOT be adopted (was adopted in a different test file)');
});
});
});