diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-23 21:11:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-23 21:11:12 +0300 |
commit | cfc8827f6bf9573b02401b1908728da3aed96698 (patch) | |
tree | 30180d04062db3e56d1cc3772888ff4f15e56c10 /spec/frontend/gpg_badges_spec.js | |
parent | a8b96c3072b3bd4d45e6364931042b350bf7fa2e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/gpg_badges_spec.js')
-rw-r--r-- | spec/frontend/gpg_badges_spec.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/frontend/gpg_badges_spec.js b/spec/frontend/gpg_badges_spec.js index 0a1596b492d..4c2242bae4b 100644 --- a/spec/frontend/gpg_badges_spec.js +++ b/spec/frontend/gpg_badges_spec.js @@ -3,6 +3,7 @@ import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures'; import { TEST_HOST } from 'spec/test_constants'; import GpgBadges from '~/gpg_badges'; import axios from '~/lib/utils/axios_utils'; +import { HTTP_STATUS_OK } from '~/lib/utils/http_status'; describe('GpgBadges', () => { let mock; @@ -63,7 +64,7 @@ describe('GpgBadges', () => { }); it('fetches commit signatures', async () => { - mock.onGet(dummyUrl).replyOnce(200); + mock.onGet(dummyUrl).replyOnce(HTTP_STATUS_OK); await GpgBadges.fetch(); @@ -75,7 +76,7 @@ describe('GpgBadges', () => { }); it('fetches commit signatures with search parameters with spaces', async () => { - mock.onGet(dummyUrl).replyOnce(200); + mock.onGet(dummyUrl).replyOnce(HTTP_STATUS_OK); setForm({ search: 'my search' }); await GpgBadges.fetch(); @@ -88,7 +89,7 @@ describe('GpgBadges', () => { }); it('fetches commit signatures with search parameters with plus symbols', async () => { - mock.onGet(dummyUrl).replyOnce(200); + mock.onGet(dummyUrl).replyOnce(HTTP_STATUS_OK); setForm({ search: 'my+search' }); await GpgBadges.fetch(); @@ -101,7 +102,7 @@ describe('GpgBadges', () => { }); it('displays a loading spinner', async () => { - mock.onGet(dummyUrl).replyOnce(200); + mock.onGet(dummyUrl).replyOnce(HTTP_STATUS_OK); await GpgBadges.fetch(); expect(document.querySelector('.js-loading-gpg-badge:empty')).toBe(null); @@ -111,7 +112,7 @@ describe('GpgBadges', () => { }); it('replaces the loading spinner', async () => { - mock.onGet(dummyUrl).replyOnce(200, dummyResponse); + mock.onGet(dummyUrl).replyOnce(HTTP_STATUS_OK, dummyResponse); await GpgBadges.fetch(); expect(document.querySelector('.js-loading-gpg-badge')).toBe(null); |