Added a test for failing scenario

This commit is contained in:
Vishal Shingala
2021-06-23 11:35:19 +05:30
parent e5039e962e
commit d4bc02157a

View File

@@ -646,6 +646,13 @@ describe('SCHEMA UTILITY FUNCTION TESTS ', function () {
});
describe('convertToPmBodyData', function() {
it('should not fail when bodyObj is not defined', function() {
var bodyWithSchema,
retValSchema = SchemaUtils.convertToPmBodyData(bodyWithSchema, 'ROOT', 'application/json');
expect(retValSchema).to.be.equal('');
});
it('should work for schemas', function() {
var bodyWithSchema = {
schema: {