forked from DECA/DECANFT-SC
36 lines
1.1 KiB
Solidity
36 lines
1.1 KiB
Solidity
|
// SPDX-License-Identifier: UNLICENSED
|
||
|
pragma solidity ^0.8.23;
|
||
|
|
||
|
import {Test, console} from "forge-std/Test.sol";
|
||
|
import {AA} from "../src/AA.sol";
|
||
|
//import {nfts} from "../.env";
|
||
|
|
||
|
contract AATest is Test {
|
||
|
AA public aaContract;
|
||
|
string public baseURI;
|
||
|
string[] public nfts;
|
||
|
|
||
|
function setUp() public {
|
||
|
baseURI = "https://gateway.decentralizedscience.org/ipfs/";
|
||
|
// Import nfts array from .env and split by ' '
|
||
|
nfts = vm.envString("nfts", ' ');
|
||
|
aaContract = new AA("DCO2s", "DCO2", baseURI, nfts);
|
||
|
}
|
||
|
|
||
|
// @notice this code safe mints an NFT to address 0x1
|
||
|
function testMint() public {
|
||
|
address to = address(0x1);
|
||
|
aaContract._mint(to,nfts[0]);
|
||
|
console.log("hola");
|
||
|
//assertEq(aaContract.ownerOf(0), to, "Token should be minted to specified address.");
|
||
|
}
|
||
|
|
||
|
// @notice: here we test getting the Base and full URIS
|
||
|
//function testGetURI68() public {
|
||
|
// aaContract._mint(address(0x1), nfts[68]);
|
||
|
// string memory tokenURI = aaContract.tokenURI(0);
|
||
|
// console.log(tokenURI);
|
||
|
// assertEq(tokenURI, string.concat(baseURI, nfts[68]));
|
||
|
//}
|
||
|
}
|