diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-09 12:09:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-09 12:09:10 +0300 |
commit | 7484851b5f762fad81ddecb4735d22828e205af1 (patch) | |
tree | b7e5da6212d2b32626b9b3d70c9089b98d05bb92 /spec/frontend/boards/stores/actions_spec.js | |
parent | 760822a53715549c2f115370ed24a19db1b7d63a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/boards/stores/actions_spec.js')
-rw-r--r-- | spec/frontend/boards/stores/actions_spec.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/spec/frontend/boards/stores/actions_spec.js b/spec/frontend/boards/stores/actions_spec.js index 8cb2c35d503..9b034c49075 100644 --- a/spec/frontend/boards/stores/actions_spec.js +++ b/spec/frontend/boards/stores/actions_spec.js @@ -1223,9 +1223,13 @@ describe('setActiveIssueMilestone', () => { }); }); -describe('setActiveIssueTitle', () => { - const state = { boardItems: { [mockIssue.id]: mockIssue } }; - const getters = { activeBoardItem: mockIssue }; +describe('setActiveItemTitle', () => { + const state = { + boardItems: { [mockIssue.id]: mockIssue }, + issuableType: 'issue', + fullPath: 'path/f', + }; + const getters = { activeBoardItem: mockIssue, isEpicBoard: false }; const testTitle = 'Test Title'; const input = { title: testTitle, @@ -1235,7 +1239,7 @@ describe('setActiveIssueTitle', () => { it('should commit title after setting the issue', (done) => { jest.spyOn(gqlClient, 'mutate').mockResolvedValue({ data: { - updateIssue: { + updateIssuableTitle: { issue: { title: testTitle, }, @@ -1251,7 +1255,7 @@ describe('setActiveIssueTitle', () => { }; testAction( - actions.setActiveIssueTitle, + actions.setActiveItemTitle, input, { ...state, ...getters }, [ @@ -1270,7 +1274,7 @@ describe('setActiveIssueTitle', () => { .spyOn(gqlClient, 'mutate') .mockResolvedValue({ data: { updateIssue: { errors: ['failed mutation'] } } }); - await expect(actions.setActiveIssueTitle({ getters }, input)).rejects.toThrow(Error); + await expect(actions.setActiveItemTitle({ getters }, input)).rejects.toThrow(Error); }); }); |