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/feature_flags | |
parent | a8b96c3072b3bd4d45e6364931042b350bf7fa2e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/feature_flags')
-rw-r--r-- | spec/frontend/feature_flags/store/edit/actions_spec.js | 7 | ||||
-rw-r--r-- | spec/frontend/feature_flags/store/new/actions_spec.js | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/spec/frontend/feature_flags/store/edit/actions_spec.js b/spec/frontend/feature_flags/store/edit/actions_spec.js index 7132e83a940..bcacfa9fda9 100644 --- a/spec/frontend/feature_flags/store/edit/actions_spec.js +++ b/spec/frontend/feature_flags/store/edit/actions_spec.js @@ -17,6 +17,7 @@ import * as types from '~/feature_flags/store/edit/mutation_types'; import state from '~/feature_flags/store/edit/state'; import { mapStrategiesToRails } from '~/feature_flags/store/helpers'; import axios from '~/lib/utils/axios_utils'; +import { HTTP_STATUS_OK } from '~/lib/utils/http_status'; jest.mock('~/lib/utils/url_utility'); @@ -55,7 +56,9 @@ describe('Feature flags Edit Module actions', () => { }, ], }; - mock.onPut(mockedState.endpoint, mapStrategiesToRails(featureFlag)).replyOnce(200); + mock + .onPut(mockedState.endpoint, mapStrategiesToRails(featureFlag)) + .replyOnce(HTTP_STATUS_OK); return testAction( updateFeatureFlag, @@ -155,7 +158,7 @@ describe('Feature flags Edit Module actions', () => { describe('success', () => { it('dispatches requestFeatureFlag and receiveFeatureFlagSuccess', () => { - mock.onGet(`${TEST_HOST}/endpoint.json`).replyOnce(200, { id: 1 }); + mock.onGet(`${TEST_HOST}/endpoint.json`).replyOnce(HTTP_STATUS_OK, { id: 1 }); return testAction( fetchFeatureFlag, diff --git a/spec/frontend/feature_flags/store/new/actions_spec.js b/spec/frontend/feature_flags/store/new/actions_spec.js index dbe6669c868..c8bf05e4dbd 100644 --- a/spec/frontend/feature_flags/store/new/actions_spec.js +++ b/spec/frontend/feature_flags/store/new/actions_spec.js @@ -11,6 +11,7 @@ import { import * as types from '~/feature_flags/store/new/mutation_types'; import state from '~/feature_flags/store/new/state'; import axios from '~/lib/utils/axios_utils'; +import { HTTP_STATUS_OK } from '~/lib/utils/http_status'; jest.mock('~/lib/utils/url_utility'); @@ -48,7 +49,9 @@ describe('Feature flags New Module Actions', () => { }, ], }; - mock.onPost(mockedState.endpoint, mapStrategiesToRails(actionParams)).replyOnce(200); + mock + .onPost(mockedState.endpoint, mapStrategiesToRails(actionParams)) + .replyOnce(HTTP_STATUS_OK); return testAction( createFeatureFlag, |