Ananas APItest bench
staging api.qa2.ananastest.com
TC-AUTH-07 Negative

Token without Bearer prefix

Verify correct format of the Authorization header

Specification · xlsx

Steps

  1. Send the request with a header missing the "Bearer" prefix

Expected result

HTTP 401; request rejected

Endpoints

POST /iam/api/v1/auth/tokenGET /order/api/v1/merchant-integration/outbound-orders/statuses

Run

API_URL
https://api.qa2.ananastest.com

Change parameters

A dry run builds every request without sending it; responses come from a local stub.

Test code

mirrors tests/TokenTest.php::tc_auth_07()
79// Verify correct format of the Authorization header
80public function tc_auth_07(): void
81{
82 $response = $this->ananas->getOrderStatuses('');
83
84 $this->assertEquals(401, $response['statusCode']);
85}

web/app/Scenarios/TokenScenarios.php · line numbers refer to this file

Not run yet. Run it against the API, or do a dry run to see the requests it would send.