diff options
Diffstat (limited to 'spec/frontend/lib/utils/rails_ujs_spec.js')
-rw-r--r-- | spec/frontend/lib/utils/rails_ujs_spec.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/frontend/lib/utils/rails_ujs_spec.js b/spec/frontend/lib/utils/rails_ujs_spec.js index da9cc5c6f3c..8ca4dfc9340 100644 --- a/spec/frontend/lib/utils/rails_ujs_spec.js +++ b/spec/frontend/lib/utils/rails_ujs_spec.js @@ -1,5 +1,6 @@ import { setHTMLFixture } from 'helpers/fixtures'; import waitForPromises from 'helpers/wait_for_promises'; +import { HTTP_STATUS_OK } from '~/lib/utils/http_status'; beforeAll(async () => { // @rails/ujs expects jQuery.ajaxPrefilter to exist if jQuery exists at @@ -20,7 +21,7 @@ function mockXHRResponse({ responseText, responseContentType } = {}) { jest.spyOn(global.XMLHttpRequest.prototype, 'send').mockImplementation(function send() { Object.defineProperties(this, { readyState: { value: XMLHttpRequest.DONE }, - status: { value: 200 }, + status: { value: HTTP_STATUS_OK }, response: { value: responseText }, }); this.onreadystatechange(); |