diff --git a/tests/javascripts/updateContent.test.js b/tests/javascripts/updateContent.test.js
index aff63d767..6923105a9 100644
--- a/tests/javascripts/updateContent.test.js
+++ b/tests/javascripts/updateContent.test.js
@@ -94,7 +94,7 @@ describe('Update content', () => {
`;
- initialHTMLString = `
+ initialHTMLString = `
${HTMLString}
`;
@@ -105,6 +105,15 @@ describe('Update content', () => {
});
+ test("It should replace the original HTML with that of the partial, to match that returned from AJAX responses", () => {
+
+ // start the module
+ window.GOVUK.modules.start();
+
+ expect(document.querySelector('.ajax-block-container').parentNode.hasAttribute('data-resource')).toBe(false);
+
+ });
+
test("It should make requests to the URL specified in the data-resource attribute", () => {
// start the module
@@ -302,7 +311,7 @@ describe('Update content', () => {
}
]);
- initialHTMLString = `
+ initialHTMLString = `
${HTMLString}
`;
@@ -336,7 +345,7 @@ describe('Update content', () => {
}
]);
- initialHTMLString = `
+ initialHTMLString = `
${HTMLString}
`;
@@ -401,7 +410,7 @@ describe('Update content', () => {
}
]);
- initialHTMLString = `
+ initialHTMLString = `
${HTMLString}
`;
@@ -447,7 +456,7 @@ describe('Update content', () => {
}
]);
- initialHTMLString = `
+ initialHTMLString = `
${HTMLString}
`;