Skip to content

Commit

Permalink
added test for string and added text plain handling just in cause
Browse files Browse the repository at this point in the history
  • Loading branch information
glena committed Jan 16, 2017
1 parent fca458c commit 2570c0d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/helper/response-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function wrapCallback(cb, options) {
return cb(errObj);
}

if (data.type && data.type === 'text/html') {
if (data.type && (data.type === 'text/html' || data.type === 'text/plain')) {
return cb(null, data.text);
}

Expand Down
12 changes: 12 additions & 0 deletions test/helper/object.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,18 @@ describe('helpers', function () {
});
});

it.only('should not breack the string', function () {
var object = "some random string";

var newObject = objectHelper.toCamelCase(object);

expect(object).to.eql("some random string");

expect(newObject).to.be.a('string');

expect(newObject).to.eql("some random string");
});

it('should change the casing to all the attributes that are not blacklisted', function () {
var object = {
attr_name_1: 'attribute_1',
Expand Down

0 comments on commit 2570c0d

Please sign in to comment.