Ananas APItest bench
staging api.qa2.ananastest.com
TC-UNPUB-03 Negative changes data

Unpublish with a non-existent ID

Verify ID validation

! Documented discrepancy · errors.txt

The invalid data has no effect on the system response and still leads to code 200 instead of 400.

Specification · xlsx

Steps

  1. Send an unpublish request with a non-existent ID

Expected result

Not specified in the spreadsheet.

Endpoints

POST /product/api/v1/merchant-integration/product/publishPOST /product/api/v1/merchant-integration/product/unpublish

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/PublishTest.php::tc_unpub_03()
61// Verify ID validation
62public function tc_unpub_03(): void
63{
64 $response = $this->ananas->unpublish([999999999]);
65
66 $this->assertEquals(400, $response['statusCode']);
67}

web/app/Scenarios/PublishScenarios.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.