describe("BOOTSTRAP - htmx AJAX Tests", function(){
beforeEach(function() {
this.server = makeServer();
clearWorkArea();
});
afterEach(function() {
this.server.restore();
clearWorkArea();
});
it('properly handles a partial of HTML', function()
{
var i = 1;
this.server.respondWith("GET", "/test", "
foo
bar
");
var div = make('');
div.click();
this.server.respond();
div.innerHTML.should.equal("foo
");
});
it('properly handles a full HTML document', function()
{
var i = 1;
this.server.respondWith("GET", "/test", "foo
bar
");
var div = make('');
div.click();
this.server.respond();
div.innerHTML.should.equal("foo
");
});
it('properly handles a full HTML document w/ data-* prefix', function()
{
var i = 1;
this.server.respondWith("GET", "/test", "foo
bar
");
var div = make('');
div.click();
this.server.respond();
div.innerHTML.should.equal("foo
");
});
})