diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /spec/frontend/integrations/edit/store/mutations_spec.js | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'spec/frontend/integrations/edit/store/mutations_spec.js')
-rw-r--r-- | spec/frontend/integrations/edit/store/mutations_spec.js | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/spec/frontend/integrations/edit/store/mutations_spec.js b/spec/frontend/integrations/edit/store/mutations_spec.js index 81f39adb87f..18faa2f6bba 100644 --- a/spec/frontend/integrations/edit/store/mutations_spec.js +++ b/spec/frontend/integrations/edit/store/mutations_spec.js @@ -1,6 +1,6 @@ +import * as types from '~/integrations/edit/store/mutation_types'; import mutations from '~/integrations/edit/store/mutations'; import createState from '~/integrations/edit/store/state'; -import * as types from '~/integrations/edit/store/mutation_types'; describe('Integration form store mutations', () => { let state; @@ -56,4 +56,30 @@ describe('Integration form store mutations', () => { expect(state.isResetting).toBe(false); }); }); + + describe(`${types.SET_JIRA_ISSUE_TYPES}`, () => { + it('sets jiraIssueTypes', () => { + const jiraIssueTypes = ['issue', 'epic']; + mutations[types.SET_JIRA_ISSUE_TYPES](state, jiraIssueTypes); + + expect(state.jiraIssueTypes).toBe(jiraIssueTypes); + }); + }); + + describe(`${types.SET_IS_LOADING_JIRA_ISSUE_TYPES}`, () => { + it.each([true, false])('sets isLoadingJiraIssueTypes to "%s"', (isLoading) => { + mutations[types.SET_IS_LOADING_JIRA_ISSUE_TYPES](state, isLoading); + + expect(state.isLoadingJiraIssueTypes).toBe(isLoading); + }); + }); + + describe(`${types.SET_JIRA_ISSUE_TYPES_ERROR_MESSAGE}`, () => { + it('sets loadingJiraIssueTypesErrorMessage', () => { + const errorMessage = 'something went wrong'; + mutations[types.SET_JIRA_ISSUE_TYPES_ERROR_MESSAGE](state, errorMessage); + + expect(state.loadingJiraIssueTypesErrorMessage).toBe(errorMessage); + }); + }); }); |