{"id":"687fc9da-746b-7f82-75e3-dc9e20528bee","name":"describe-it","description":"A collection that demonstrate mocha style testing framework in test scripts.","order":["3d285daf-2c05-61ec-a784-2da8bc4616a3","b26f3763-0fa1-cc6b-1c46-82512c9509e0","7fd6782e-5aef-8dc2-0e60-94403774b4a1","ff25d166-2405-11c2-b745-a28838db7cd1","e198a433-bdfa-2a98-1194-1150553665f7"],"folders":[],"timestamp":1443267352066,"owner":"33232","remoteLink":"https://www.getpostman.com/collections/34163da95c4372e36c39","public":false,"requests":[{"id":"3d285daf-2c05-61ec-a784-2da8bc4616a3","headers":"Content-Type: application/json\n","url":"https://gist.githubusercontent.com/shamasis/f9eb2cb3c09f6dd3042f/raw/35bc97d25e15e3ae22017a91df655da0bd0751b5/describe-it.min.js","preRequestScript":"","pathVariables":{},"method":"GET","data":[],"dataMode":"params","version":2,"tests":"postman.setGlobalVariable(\"module:describe-it\", responseBody);\ntry {\n    eval(responseBody);\n}\ncatch (e) { }\ntests['Framework ready'] = (typeof describe === 'function');","currentHelper":"normal","helperAttributes":{},"time":1443385779589,"name":"Fetch Testing Framework","description":"","collectionId":"687fc9da-746b-7f82-75e3-dc9e20528bee","responses":[]},{"id":"7fd6782e-5aef-8dc2-0e60-94403774b4a1","headers":"","url":"http://dump.getpostman.com/get?error=yes","preRequestScript":"","pathVariables":{},"method":"GET","data":[],"dataMode":"params","version":2,"tests":"eval(postman.getGlobalVariable(\"module:describe-it\"));\n\ndescribe (\"response\", function () {\n    var responseJSON;\n    \n    it (\"must be a valid JSON\", function () {\n      responseJSON = JSON.parse(responseBody);\n      expect(typeof responseJSON).toBe('object');\n    });\n    \n    describe(\"json\", function () {\n        it(\"must not have error object\", function () {\n          expect(responseJSON.args.error).toNotBeOk();\n        });\n        \n        it(\"must have a message\", function () {\n          expect(responseJSON.args.message).toBeOk();\n        });\n    });\n});","currentHelper":"normal","helperAttributes":{},"time":1443471327170,"name":"Response JSON Check (Fails)","description":"This request tests whether the response is JSON and if it has a specific content. \nHowever, the response returned fails the checks.","collectionId":"687fc9da-746b-7f82-75e3-dc9e20528bee","responses":[]},{"id":"b26f3763-0fa1-cc6b-1c46-82512c9509e0","headers":"","url":"http://dump.getpostman.com/get?message=hi","preRequestScript":"","pathVariables":{},"method":"GET","data":[],"dataMode":"params","version":2,"tests":"eval(postman.getGlobalVariable(\"module:describe-it\"));\n\ndescribe (\"response\", function () {\n    var responseJSON;\n    \n    it (\"must be a valid JSON\", function () {\n      responseJSON = JSON.parse(responseBody);\n      expect(typeof responseJSON).toBe('object');\n    });\n    \n    describe(\"json\", function () {\n        it(\"must not have error object\", function () {\n          expect(responseJSON.args.error).toNotBeOk();\n        });\n        \n        it(\"must have a message\", function () {\n          expect(responseJSON.args.message).toBeOk();\n        });\n    });\n});","currentHelper":"normal","helperAttributes":{},"time":1443471320275,"name":"Response JSON Check (Passes)","description":"This request expects a JSON response with a specific content in it.","collectionId":"687fc9da-746b-7f82-75e3-dc9e20528bee","responses":[]},{"id":"e198a433-bdfa-2a98-1194-1150553665f7","headers":"","url":"http://dump.getpostman.com/code/404","preRequestScript":"","pathVariables":{},"method":"GET","data":[],"dataMode":"params","version":2,"tests":"eval(postman.getGlobalVariable(\"module:describe-it\"));\n\ndescribe (\"response\", function () {\n    it (\"must have html content type header\", function () {\n      expect(responseHeaders['Content-Type']).toBe('text/html; charset=utf-8');\n    });\n    it (\"must return a 200 status code\", function () {\n        expect(responseCode.code).toEql(200);     \n    });\n});","currentHelper":"normal","helperAttributes":{},"time":1443471077882,"name":"Status Code Check (Fails)","description":"This request have tests that expect a response with status code `200`. \nHowever, the request returns a `404` and causes the tests to fail.","collectionId":"687fc9da-746b-7f82-75e3-dc9e20528bee","responses":[]},{"id":"ff25d166-2405-11c2-b745-a28838db7cd1","headers":"","url":"http://dump.getpostman.com/code/200","pathVariables":{},"preRequestScript":"","method":"GET","collectionId":"687fc9da-746b-7f82-75e3-dc9e20528bee","data":[],"dataMode":"params","name":"Status Code Check (Passes)","description":"This request have tests that expect a response with status code `200`.","descriptionFormat":"html","time":1443470957819,"version":2,"responses":[],"tests":"eval(postman.getGlobalVariable(\"module:describe-it\"));\n\ndescribe (\"response\", function () {\n    it (\"must have html content type header\", function () {\n      expect(responseHeaders['Content-Type']).toBe('text/html; charset=utf-8');\n    });\n    it (\"must return a 200 status code\", function () {\n        expect(responseCode.code).toEql(200);     \n    });\n});","currentHelper":"normal","helperAttributes":{}}]}