diff --git a/test/attributes/hx-include.js b/test/attributes/hx-include.js index b7c8a826..8f4b3be3 100644 --- a/test/attributes/hx-include.js +++ b/test/attributes/hx-include.js @@ -77,6 +77,22 @@ describe("hx-include attribute", function() { }); it('Two inputs are included twice when they have the same name', function () { + this.server.respondWith("POST", "/include", function (xhr) { + var params = getParameters(xhr); + params['i1'].should.deep.equal(["test", "test2"]); + xhr.respond(200, {}, "Clicked!") + }); + var div = make('
' + + '' + + '' + + '
') + var input = byId("i1") + input.click(); + this.server.respond(); + div.innerHTML.should.equal("Clicked!"); + }); + + it('Two inputs are included twice when in form when they have the same name', function () { this.server.respondWith("POST", "/include", function (xhr) { var params = getParameters(xhr); params['i1'].should.deep.equal(["test", "test2"]);