$kind: http-request
url: "{{csmisUrl}}/marketing/cooperative-buyers"
method: GET
headers:
  cooperativeApiToken: "{{COOPERATIVEAPITOKEN}}"
scripts:
  - type: afterResponse
    code: >-
      pm.test("Response status code is 500", function () {
          pm.expect(pm.response.code).to.equal(500);
      });



      pm.test("Response has the required fields", function () {
          const responseData = pm.response.json();
          
          pm.expect(responseData).to.be.an('object');
          pm.expect(responseData).to.have.property('statusCode');
          pm.expect(responseData).to.have.property('data');
          pm.expect(responseData).to.have.property('message');
      });



      pm.test("Data field should be null", function () {
        const responseData = pm.response.json();
        pm.expect(responseData.data).to.be.null;
      });



      pm.test("Message field is an empty string", function () {
        const responseData = pm.response.json();
        
        pm.expect(responseData.message).to.be.an('string').and.to.be.empty;
      });



      pm.test("Content-Type header is application/json", function () {
          pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
      });
    language: text/javascript
order: 3000
