diff options
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 | 8 |
1 files changed, 2 insertions, 6 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 1139f094705..01f7ada9cd6 100644 --- a/spec/frontend/create_cluster/eks_cluster/store/actions_spec.js +++ b/spec/frontend/create_cluster/eks_cluster/store/actions_spec.js @@ -1,4 +1,5 @@ import testAction from 'helpers/vuex_action_helper'; +import { useMockLocationHelper } from 'helpers/mock_window_location_helper'; import MockAdapter from 'axios-mock-adapter'; import createState from '~/create_cluster/eks_cluster/store/state'; import * as actions from '~/create_cluster/eks_cluster/store/actions'; @@ -251,12 +252,7 @@ describe('EKS Cluster Store Actions', () => { }); describe('createClusterSuccess', () => { - beforeEach(() => { - jest.spyOn(window.location, 'assign').mockImplementation(() => {}); - }); - afterEach(() => { - window.location.assign.mockRestore(); - }); + useMockLocationHelper(); it('redirects to the new cluster URL', () => { actions.createClusterSuccess(null, newClusterUrl); |