mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 15:33:11 +01:00
test: added test for self closing tags in xml-json parser (#2891)
Co-authored-by: Anusree Subash <anusree@usebruno.com>
This commit is contained in:
parent
44d70ca02a
commit
8b76ecede3
@ -0,0 +1,37 @@
|
||||
meta {
|
||||
name: echo xml parsed(self closing tags)
|
||||
type: http
|
||||
seq: 6
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{host}}/api/echo/xml-parsed
|
||||
body: xml
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:xml {
|
||||
<hello>
|
||||
<world>bruno</world>
|
||||
<world/>
|
||||
</hello>
|
||||
}
|
||||
|
||||
assert {
|
||||
res.status: eq 200
|
||||
}
|
||||
|
||||
tests {
|
||||
test("should return parsed xml", function() {
|
||||
const data = res.getBody();
|
||||
expect(res.getBody()).to.eql({
|
||||
"hello": {
|
||||
"world": [
|
||||
"bruno",
|
||||
""
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user