From 881410ec5fa6a70665a17b17cfc7cbf866710456 Mon Sep 17 00:00:00 2001 From: George Mulhearn Date: Tue, 26 Nov 2024 10:42:33 +1000 Subject: [PATCH] cheqd did url tests Signed-off-by: George Mulhearn --- .../did_parser_nom/tests/did_url/positive.rs | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/did_core/did_parser_nom/tests/did_url/positive.rs b/did_core/did_parser_nom/tests/did_url/positive.rs index fea2099559..ced17a3b35 100644 --- a/did_core/did_parser_nom/tests/did_url/positive.rs +++ b/did_core/did_parser_nom/tests/did_url/positive.rs @@ -361,4 +361,27 @@ test_cases_positive! { Some("/anoncreds/v0/REV_REG_DEF/56495/npdb/TAG1"), None, HashMap::new() + test_case28: + "did:cheqd:testnet:d8ac0372-0d4b-413e-8ef5-8e8f07822b2c/resources/40829caf-b415-4b1d-91a3-b56dfb6374f4", + Some("did:cheqd:testnet:d8ac0372-0d4b-413e-8ef5-8e8f07822b2c"), + Some("cheqd"), + Some("testnet"), + Some("d8ac0372-0d4b-413e-8ef5-8e8f07822b2c"), + Some("/resources/40829caf-b415-4b1d-91a3-b56dfb6374f4"), + None, + HashMap::new() + test_case29: + "did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1J?resourceName=universityDegree&resourceType=anonCredsCredDef", + Some("did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1J"), + Some("cheqd"), + Some("mainnet"), + Some("zF7rhDBfUt9d1gJPjx7s1J"), + None, + None, + { + vec![ + ("resourceName".to_string(), "universityDegree".to_string()), + ("resourceType".to_string(), "anonCredsCredDef".to_string()), + ].into_iter().collect() + } }