Skip to content

Commit

Permalink
Remove the SEP-24 account requirement test in deposit (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
lijamie98 authored Feb 7, 2023
1 parent 46431f0 commit 9da76a7
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions @stellar/anchor-tests/src/tests/sep24/deposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,46 +140,6 @@ const depositRequiresAssetCode: Test = {
};
tests.push(depositRequiresAssetCode);

const depositRequiresAccount: Test = {
assertion: "requires 'account' parameter",
sep: 24,
group: depositTestsGroup,
dependencies: depositRequiresAssetCode.dependencies,
context: depositRequiresAssetCode.context,
failureModes: depositRequiresAssetCode.failureModes,
async run(config: Config): Promise<Result> {
const result: Result = { networkCalls: [] };
const postDepositCall: NetworkCall = {
request: new Request(
this.context.expects.transferServerUrl + depositEndpoint,
{
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${this.context.expects.token}`,
},
body: JSON.stringify({ asset_code: config.assetCode }),
},
),
};
result.networkCalls.push(postDepositCall);
const errorResponse = await makeRequest(
postDepositCall,
400,
result,
"application/json",
);
if (result.failure || !errorResponse) return result;
if (!errorResponse.error) {
result.failure = makeFailure(
this.failureModes.NO_ERROR_RESPONSE_ATTRIBUTE,
);
}
return result;
},
};
tests.push(depositRequiresAccount);

const depositRejectsInvalidAccount: Test = {
assertion: "rejects invalid 'account' parameter",
sep: 24,
Expand Down

0 comments on commit 9da76a7

Please sign in to comment.