baalexander/node-xmlrpc — Issue #30: failing test: buildMethodCall with a one-level struct and an empty property name
Author: blaenk
Created: 2011-10-24 02:08:27+00:00
State: open

This test has failed ever since I can remember. I just now decided to take a look at it:

A buildMethodCall call with a one-level struct and an empty property name
✗ contains the struct
» expected 'testMethodstring1intName3',
got	'testMethodstringNameintName3' (==) // xmlrpc-builder-test.js:170
✗ Broken » 75 honored ∙ 1 broken (1.036s)

If you match them:

expect: testMethodstring1intName3
got: testMethodstringNameintName3

Given test data:

[{stringName: '', intName: 3}]

It seems like the 'expected' XML is wrong? For example, I don't know where `string1` came from. the `name` property, based on the `intName`, should be set to `stringName` just like it is in the received XML. The string passed is empty so presumably we should indeed have a ``. I changed it to match this and of course it passes, but I wanted to ask before I file a pull request in case I'm misunderstanding something.

In short, I believe the test's expected result is actually wrong and should indeed be set to what we're actually receiving, which would allow the test to pass. I base this hypothesis on how the `intName` data is structured.