Commit c9e8a66e by Leo Arias Committed by Francisco Giordano

Add the missing test for ERC721Holder (#1249)

* Add the missing test for ERC721Holder

* fix lint

* Move the holder test to a separate file

(cherry picked from commit 396680b8)
parent e7c99dd7
const ERC721Holder = artifacts.require('ERC721Holder.sol');
const ERC721Mintable = artifacts.require('ERC721MintableBurnableImpl.sol');
require('chai')
.should();
contract('ERC721Holder', function ([creator]) {
it('receives an ERC721 token', async function () {
const token = await ERC721Mintable.new({ from: creator });
const tokenId = 1;
await token.mint(creator, tokenId, { from: creator });
const receiver = await ERC721Holder.new();
await token.approve(receiver.address, tokenId, { from: creator });
await token.safeTransferFrom(creator, receiver.address, tokenId);
(await token.ownerOf(tokenId)).should.be.equal(receiver.address);
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment