fix: authorized_credential elements in array not objects bug (#1744) (#1747)

fixes: #1743
This commit is contained in:
Peter Chen
2024-11-21 12:05:15 -05:00
committed by GitHub
parent 592af70f03
commit d001e35427
3 changed files with 27 additions and 5 deletions

View File

@@ -222,6 +222,21 @@ generateTestValuesForParametersTest()
"authorized_credentials not array"
},
ParamTestCaseBundle{
"InvalidDepositPreauthJsonAuthorizeCredentialsMalformedString",
fmt::format(
R"({{
"deposit_preauth": {{
"owner": "{}",
"authorized_credentials": ["C2F2A19C8D0D893D18F18FDCFE13A3ECB41767E48422DF07F2455CDA08FDF09B"]
}}
}})",
ACCOUNT
),
"malformedAuthorizedCredentials",
"authorized_credentials elements in array are not objects."
},
ParamTestCaseBundle{
"DepositPreauthBothAuthAndAuthCredentialsDoesNotExists",
fmt::format(
@@ -273,7 +288,7 @@ generateTestValuesForParametersTest()
ACCOUNT
),
"malformedAuthorizedCredentials",
"Requires at least one element in authorized_credentials array"
"Requires at least one element in authorized_credentials array."
},
ParamTestCaseBundle{