geraintluff / uri-templates

JavaScript utility for RFC 6570: URI Templates
138 stars 21 forks source link

de-substitution from a url without any parameter values does not return a empty object #17

Closed osvaldopina closed 9 years ago

osvaldopina commented 9 years ago

De-substitution from a url without any parameter values does not return a empty object

describe("Decode empty query ", function () {
    it('Must return a empty object', function () {
        var template = new UriTemplate('{?query}');

        var uri = '?';
        var guess = template.fromUri(uri);

        assert.isUndefined(guess['']);

    });
});
geraintluff commented 9 years ago

Should be fixed in v0.1.9 :)