Skip to content

Commit

Permalink
remove unused erc1155 in test
Browse files Browse the repository at this point in the history
  • Loading branch information
qalisander committed Dec 11, 2024
1 parent 19f284d commit 733f2e7
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions contracts/src/token/erc1155/extensions/uri_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,14 @@ mod tests {
}

#[storage]
struct Erc1155Example {
pub erc1155: Erc1155,
struct Erc1155MetadataExample {
pub metadata_uri: Erc1155MetadataUri,
pub uri_storage: Erc1155UriStorage,
}

#[motsu::test]
fn uri_returns_metadata_uri_when_token_uri_is_not_set(
contract: Erc1155Example,
contract: Erc1155MetadataExample,
) {
let token_id = random_token_id();
let uri = "https://some.metadata/token/uri";
Expand All @@ -124,7 +123,9 @@ mod tests {
}

#[motsu::test]
fn uri_returns_empty_string_when_no_uri_is_set(contract: Erc1155Example) {
fn uri_returns_empty_string_when_no_uri_is_set(
contract: Erc1155MetadataExample,
) {
let token_id = random_token_id();

assert!(contract
Expand All @@ -134,7 +135,9 @@ mod tests {
}

#[motsu::test]
fn uri_returns_token_uri_when_base_uri_is_empty(contract: Erc1155Example) {
fn uri_returns_token_uri_when_base_uri_is_empty(
contract: Erc1155MetadataExample,
) {
let token_id = random_token_id();
let token_uri = "https://some.short/token/uri";

Expand All @@ -152,7 +155,7 @@ mod tests {

#[motsu::test]
fn uri_returns_concatenated_base_uri_and_token_uri(
contract: Erc1155Example,
contract: Erc1155MetadataExample,
) {
let token_id = random_token_id();
let base_uri = "https://some.base.uri";
Expand All @@ -173,7 +176,7 @@ mod tests {

#[motsu::test]
fn uri_ignores_metadata_uri_when_token_uri_is_set(
contract: Erc1155Example,
contract: Erc1155MetadataExample,
) {
let token_id = random_token_id();
let uri = "https://some.metadata/token/uri";
Expand All @@ -193,7 +196,7 @@ mod tests {
}

#[motsu::test]
fn test_set_uri(contract: Erc1155Example) {
fn test_set_uri(contract: Erc1155MetadataExample) {
let token_id = random_token_id();
let uri = "https://some.metadata/token/uri";
let token_uri = "https://some.short/token/uri".to_string();
Expand Down

0 comments on commit 733f2e7

Please sign in to comment.