- add data type validation for data param

- support strings as data when "utf8" serializer is configured
This commit is contained in:
Sefa Ilkimen
2018-02-07 18:24:39 +01:00
parent ebef9a2944
commit 25b4a283ea
2 changed files with 59 additions and 6 deletions
+1 -1
View File
@@ -388,7 +388,7 @@ const tests = [
expected: 'resolved: {"status": 200, "data": "{\\"data\\": \\"this is a test string\\"...',
before: helpers.setUtf8StringSerializer,
func: function(resolve, reject) {
cordova.plugin.http.post('http://httpbin.org/anything', { text: 'this is a test string' }, {}, resolve, reject);
cordova.plugin.http.post('http://httpbin.org/anything', 'this is a test string', {}, resolve, reject);
},
validationFunc: function(driver, result) {
result.type.should.be.equal('resolved');