@@ -8,6 +8,8 @@ import { IYieldAggregator } from "contracts/interface/IYieldAggregator.sol";
88import { BaseTest } from "../BaseTest.t.sol " ;
99
1010contract SharesFactoryTests is BaseTest {
11+ string private constant URI = "https://vv.com/uri/ " ;
12+
1113 function setUp () public {
1214 createFactory ();
1315 _setUpShare ();
@@ -19,7 +21,7 @@ contract SharesFactoryTests is BaseTest {
1921
2022 // Alice mint & buy 1 share with 0 id
2123 vm.prank (addrAlice);
22- sharesFactory.mintShare (defaultCurveType);
24+ sharesFactory.mintShare (defaultCurveType, URI );
2325 _buyShare (addrAlice, 0 , 1 , referralReceiver);
2426
2527 // Bob mintAndBuy 1 share with 1 id
@@ -39,16 +41,18 @@ contract SharesFactoryTests is BaseTest {
3941
4042 function test_mintShare () public {
4143 vm.prank (addrAlice);
42- sharesFactory.mintShare (defaultCurveType);
44+ sharesFactory.mintShare (defaultCurveType, URI );
4345
4446 uint256 shareIndex = sharesFactory.shareIndex ();
4547 (address creator , uint8 curveType ) = sharesFactory.getShare (shareIndex - 1 );
48+ string memory tokenURI = sharesNFT.tokenURIs (shareIndex - 1 );
4649
4750 assertEq (creator, addrAlice);
4851 assertEq (curveType, defaultCurveType);
52+ assertEq (tokenURI, URI);
4953
5054 vm.expectRevert (bytes ("Invalid curveType " ));
51- sharesFactory.mintShare (99 );
55+ sharesFactory.mintShare (99 , URI );
5256 }
5357
5458 function test_minAndBuyShare () public {
@@ -59,10 +63,12 @@ contract SharesFactoryTests is BaseTest {
5963 uint256 shareId = sharesFactory.shareIndex () - 1 ;
6064 uint256 bobShareBal = sharesNFT.shareBalanceOf (addrBob, shareId);
6165 (address creator , uint8 curveType ) = sharesFactory.getShare (shareId);
66+ string memory tokenURI = sharesNFT.tokenURIs (shareId);
6267
6368 assertEq (creator, addrBob);
6469 assertEq (curveType, defaultCurveType);
6570 assertEq (bobShareBal, 99 );
71+ assertEq (tokenURI, URI);
6672 }
6773
6874 function test_buyShares () public {
@@ -534,7 +540,7 @@ contract SharesFactoryTests is BaseTest {
534540 uint256 buyPrice = sharesFactory.getSubTotal (0 , quantity, curveType);
535541
536542 vm.prank (address (sender));
537- sharesFactory.mintAndBuyShare { value: buyPrice * 110 / 100 }(curveType, quantity, referral);
543+ sharesFactory.mintAndBuyShare { value: buyPrice * 110 / 100 }(curveType, quantity, URI, referral);
538544 }
539545
540546 function _buyShare (address sender , uint256 shareId , uint32 quantity , address referral ) internal {
0 commit comments