Skip to content

Commit

Permalink
fix(ark-metadata): fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
remiroyc committed Jul 8, 2024
1 parent 3ea9c21 commit 23b4912
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions crates/ark-metadata/src/metadata_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,23 +493,22 @@ mod tests {
let filter_clone = filter.clone();

mock_storage
.expect_find_tokens_without_metadata()
.times(1)
.withf(
move |arg_filter: &Option<(String, String)>,
arg_metadata_status: &Option<String>| {
*arg_filter == Some(filter_clone.clone()) && *arg_metadata_status == None
},
)
.returning(|_, _| {
Ok(vec![TokenWithoutMetadata {
contract_address: contract_address.to_string(),
token_id: "1".to_string(),
chain_id: "0x534e5f4d41494e".to_string(),
is_verified: true,
save_images: false,
}])
});
.expect_find_tokens_without_metadata()
.times(1)
.withf(
move |arg_filter: &Option<(String, String)>, arg_refresh_collection: &bool| {
*arg_filter == Some(filter_clone.clone()) && *arg_refresh_collection == false
},
)
.returning(|_, _| {
Ok(vec![TokenWithoutMetadata {
contract_address: contract_address.to_string(),
token_id: "1".to_string(),
chain_id: "0x534e5f4d41494e".to_string(),
is_verified: true,
save_images: false,
}])
});

mock_client
.expect_call_contract()
Expand Down Expand Up @@ -541,7 +540,7 @@ mod tests {
ipfs_gateway_uri,
Duration::from_secs(5),
request_referrer,
None,
false
)
.await;

Expand Down

0 comments on commit 23b4912

Please sign in to comment.