$kind: http-request
description: Get list of all economic activities
url: "{{csmisUrl}}/marketing/cooperative-buyers"
method: GET
headers:
  cooperativeApiToken: f+ZVkPbcicultR5GpkPqGctsQ3fQ9bUTlLx8pjEH/9I=
scripts:
  - type: afterResponse
    code: >-
      pm.test("Response status code is 200", function () {
          pm.expect(pm.response.code).to.equal(200);
      });



      pm.test("Content type is application/json", function () {
          pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
      });



      pm.test("Data array is present in the response", function () {
          const responseData = pm.response.json();

          pm.expect(responseData).to.be.an('object');
          pm.expect(responseData.data).to.exist.and.to.be.an('array');
      });



      pm.test("Validate statusCode is 0", function () {
          const responseData = pm.response.json();
          
          pm.expect(responseData.statusCode).to.equal(0);
      });



      pm.test("Message is an empty string", function () {
          const responseData = pm.response.json();
          
          pm.expect(responseData.message).to.be.an('string').and.to.be.empty;
      });
    language: text/javascript
order: 1000
