mirror of
https://github.com/th30d4y/OpenLearnX.git
synced 2026-05-27 03:36:32 +00:00
Fix .gitignore: stop tracking ignored files
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
const { expect } = require('chai');
|
||||
|
||||
const ERC721Holder = artifacts.require('ERC721Holder');
|
||||
const ERC721 = artifacts.require('$ERC721');
|
||||
|
||||
contract('ERC721Holder', function (accounts) {
|
||||
const [owner] = accounts;
|
||||
|
||||
const name = 'Non Fungible Token';
|
||||
const symbol = 'NFT';
|
||||
const tokenId = web3.utils.toBN(1);
|
||||
|
||||
it('receives an ERC721 token', async function () {
|
||||
const token = await ERC721.new(name, symbol);
|
||||
await token.$_mint(owner, tokenId);
|
||||
|
||||
const receiver = await ERC721Holder.new();
|
||||
await token.safeTransferFrom(owner, receiver.address, tokenId, { from: owner });
|
||||
|
||||
expect(await token.ownerOf(tokenId)).to.be.equal(receiver.address);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user