Skip to content

Commit

Permalink
Update testUnauthorizedTransferOwnerTransferFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
ninokeldishvili committed Nov 1, 2024
1 parent e9a27ff commit 75f4a11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/src/concrete/receipt/Receipt.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ contract ReceiptTest is ReceiptFactoryTest {
receiptOwner.setFrom(address(0));
receiptOwner.setTo(alice);

vm.startPrank(alice);
receiptOwner.ownerMint(receipt, alice, id, amount, fuzzedReceiptInformation);
uint256 receiptBalance = receipt.balanceOf(alice, id);
transferAmount = bound(transferAmount, receiptBalance + 1, type(uint256).max);
Expand All @@ -190,17 +189,18 @@ contract ReceiptTest is ReceiptFactoryTest {
amount = bound(amount, 1, type(uint256).max);
id = bound(id, 0, type(uint256).max);

TestReceipt receipt = new TestReceipt();
TestReceipt receipt = createReceipt(alice);
TestReceiptOwner receiptOwner = new TestReceiptOwner();

vm.startPrank(alice);

// Set the receipt owner
receipt.setOwner(address(receiptOwner));
receipt.transferOwnership(address(receiptOwner));

// Set the authorized 'from' and 'to' addresses in receiptOwner
receiptOwner.setFrom(address(0));
receiptOwner.setTo(alice);

vm.startPrank(alice);
receiptOwner.ownerMint(receipt, alice, id, amount, fuzzedReceiptInformation);
uint256 receiptBalance = receipt.balanceOf(alice, id);

Expand Down

0 comments on commit 75f4a11

Please sign in to comment.