diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 11:59:07 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 11:59:07 +0000 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /spec/frontend/create_cluster/eks_cluster/store/actions_spec.js | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) | |
download | gitlab-ce-8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca.tar.gz |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'spec/frontend/create_cluster/eks_cluster/store/actions_spec.js')
-rw-r--r-- | spec/frontend/create_cluster/eks_cluster/store/actions_spec.js | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/spec/frontend/create_cluster/eks_cluster/store/actions_spec.js b/spec/frontend/create_cluster/eks_cluster/store/actions_spec.js index f12f300872a..f14a555f357 100644 --- a/spec/frontend/create_cluster/eks_cluster/store/actions_spec.js +++ b/spec/frontend/create_cluster/eks_cluster/store/actions_spec.js @@ -186,7 +186,7 @@ describe('EKS Cluster Store Actions', () => { role_external_id: payload.externalId, region: DEFAULT_REGION, }) - .reply(400, error); + .reply(400, null); }); it('dispatches createRoleError action', () => @@ -198,6 +198,32 @@ describe('EKS Cluster Store Actions', () => { [{ type: 'requestCreateRole' }, { type: 'createRoleError', payload: { error } }], )); }); + + describe('when request fails with a message', () => { + beforeEach(() => { + const errResp = { message: 'Something failed' }; + + mock + .onPost(state.createRolePath, { + role_arn: payload.roleArn, + role_external_id: payload.externalId, + region: DEFAULT_REGION, + }) + .reply(4, errResp); + }); + + it('dispatches createRoleError action', () => + testAction( + actions.createRole, + payload, + state, + [], + [ + { type: 'requestCreateRole' }, + { type: 'createRoleError', payload: { error: 'Something failed' } }, + ], + )); + }); }); describe('requestCreateRole', () => { |