v0.4.8-pre.013
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// file: kb-pipeline/tests/external_metadata_metaplex_token_metadata_pipeline_api.rs
|
||||
// version: 1
|
||||
|
||||
//! External-only coverage for the public Metaplex Token Metadata pipeline contract.
|
||||
|
||||
#[test]
|
||||
fn external_consumers_can_request_edition_marker_state_through_crate_root_exports() {
|
||||
let account = kb_lib::MdPubkey(solana_pubkey::Pubkey::new_from_array([7_u8; 32]).to_string());
|
||||
let mint = kb_lib::MdPubkey(solana_pubkey::Pubkey::new_from_array([8_u8; 32]).to_string());
|
||||
let request = kb_pipeline::MetaplexTokenMetadataStatefulReadRequest {
|
||||
query_role: "rpc".to_string(),
|
||||
account,
|
||||
kind: kb_pipeline::MetaplexTokenMetadataAccountKind::EditionMarker { mint, edition: 1 },
|
||||
min_context_slot: std::option::Option::Some(42),
|
||||
max_data_bytes: kb_pipeline::MAX_METAPLEX_TOKEN_METADATA_ACCOUNT_BYTES,
|
||||
};
|
||||
assert!(request.validate().is_ok());
|
||||
let json = match serde_json::to_value(&request) {
|
||||
std::result::Result::Ok(value) => value,
|
||||
std::result::Result::Err(error) => panic!("request serialization failed: {error}"),
|
||||
};
|
||||
assert_eq!(json["kind"]["kind"], "edition_marker");
|
||||
assert_eq!(json["kind"]["edition"], 1);
|
||||
}
|
||||
Reference in New Issue
Block a user