Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-fleming committed Nov 24, 2023
1 parent cde00a4 commit b13e02e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/tests/presets/test_erc721.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ fn test_get_approved() {
#[should_panic(expected: ('ERC721: invalid token ID', 'ENTRYPOINT_FAILED'))]
fn test_get_approved_nonexistent() {
let dispatcher = setup_dispatcher();
dispatcher.get_approved(7);
dispatcher.get_approved(NONEXISTENT);
}

//
Expand Down Expand Up @@ -395,18 +395,18 @@ fn test_transferFrom_owner() {

#[test]
#[available_gas(20000000)]
#[should_panic(expected: ('ERC721: wrong sender', 'ENTRYPOINT_FAILED'))]
#[should_panic(expected: ('ERC721: invalid token ID', 'ENTRYPOINT_FAILED'))]
fn test_transfer_from_nonexistent() {
let dispatcher = setup_dispatcher();
dispatcher.transfer_from(ZERO(), RECIPIENT(), TOKEN_1);
dispatcher.transfer_from(OWNER(), RECIPIENT(), NONEXISTENT);
}

#[test]
#[available_gas(20000000)]
#[should_panic(expected: ('ERC721: wrong sender', 'ENTRYPOINT_FAILED'))]
#[should_panic(expected: ('ERC721: invalid token ID', 'ENTRYPOINT_FAILED'))]
fn test_transferFrom_nonexistent() {
let dispatcher = setup_dispatcher();
dispatcher.transferFrom(ZERO(), RECIPIENT(), TOKEN_1);
dispatcher.transferFrom(OWNER(), RECIPIENT(), NONEXISTENT);
}

#[test]
Expand Down Expand Up @@ -776,18 +776,18 @@ fn test_safeTransferFrom_to_non_receiver() {

#[test]
#[available_gas(20000000)]
#[should_panic(expected: ('ERC721: wrong sender', 'ENTRYPOINT_FAILED'))]
#[should_panic(expected: ('ERC721: invalid token ID', 'ENTRYPOINT_FAILED'))]
fn test_safe_transfer_from_nonexistent() {
let dispatcher = setup_dispatcher();
dispatcher.safe_transfer_from(ZERO(), RECIPIENT(), TOKEN_1, DATA(true));
dispatcher.safe_transfer_from(OWNER(), RECIPIENT(), NONEXISTENT, DATA(true));
}

#[test]
#[available_gas(20000000)]
#[should_panic(expected: ('ERC721: wrong sender', 'ENTRYPOINT_FAILED'))]
#[should_panic(expected: ('ERC721: invalid token ID', 'ENTRYPOINT_FAILED'))]
fn test_safeTransferFrom_nonexistent() {
let dispatcher = setup_dispatcher();
dispatcher.safeTransferFrom(ZERO(), RECIPIENT(), TOKEN_1, DATA(true));
dispatcher.safeTransferFrom(OWNER(), RECIPIENT(), NONEXISTENT, DATA(true));
}

#[test]
Expand Down

0 comments on commit b13e02e

Please sign in to comment.