macoslinuxwindowsinboxwhatsappicloudtweetdeckhipchattelegramhangoutsslackgmailskypefacebook-workplaceoutlookemailmicrosoft-teamsdiscordmessengercustom-services
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.0 KiB
29 lines
1.0 KiB
describe("Ext.data.soap.Reader", function() { |
|
|
|
var parseXml = function(str) { |
|
if (window.ActiveXObject) { |
|
var doc = new ActiveXObject('Microsoft.XMLDOM'); |
|
doc.loadXML(str); |
|
return doc; |
|
} else if (window.DOMParser) { |
|
return (new DOMParser()).parseFromString(str, 'text/xml'); |
|
} |
|
}, |
|
getEnvelope = function(str){ |
|
str = ['<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">', |
|
'<soap:Body>', |
|
str, |
|
'</soap:Body>', |
|
'</soap:Envelope>'].join('\n'); |
|
return parseXml(str); |
|
}; |
|
|
|
describe("getData", function() { |
|
it("should extract the soap body from the soap envelope", function() { |
|
var reader = new Ext.data.soap.Reader(), |
|
doc = getEnvelope('<Results></Results>'); |
|
|
|
expect(reader.getData(doc).tagName).toBe('soap:Body'); |
|
}); |
|
}); |
|
}); |