diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-21 03:10:27 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-21 03:10:27 +0000 |
commit | 6575e44cae996d484cbba87a078022768a116db9 (patch) | |
tree | 384f6399d1bea03503354b88ce151867ce4daa1b /spec/frontend/snippets/components/edit_spec.js | |
parent | 019109eac9cbddc6149af0adeff1aad8195b1457 (diff) | |
download | gitlab-ce-6575e44cae996d484cbba87a078022768a116db9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/snippets/components/edit_spec.js')
-rw-r--r-- | spec/frontend/snippets/components/edit_spec.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/frontend/snippets/components/edit_spec.js b/spec/frontend/snippets/components/edit_spec.js index efdb52cfcd9..450f8e06b2a 100644 --- a/spec/frontend/snippets/components/edit_spec.js +++ b/spec/frontend/snippets/components/edit_spec.js @@ -8,7 +8,7 @@ import createMockApollo from 'helpers/mock_apollo_helper'; import waitForPromises from 'helpers/wait_for_promises'; import GetSnippetQuery from 'shared_queries/snippet/snippet.query.graphql'; import UnsolvedCaptchaError from '~/captcha/unsolved_captcha_error'; -import { deprecatedCreateFlash as Flash } from '~/flash'; +import createFlash from '~/flash'; import * as urlUtils from '~/lib/utils/url_utility'; import SnippetEditApp from '~/snippets/components/edit.vue'; import SnippetBlobActionsEdit from '~/snippets/components/snippet_blob_actions_edit.vue'; @@ -319,7 +319,9 @@ describe('Snippet Edit app', () => { }); expect(urlUtils.redirectTo).not.toHaveBeenCalled(); - expect(Flash).toHaveBeenCalledWith(expectMessage); + expect(createFlash).toHaveBeenCalledWith({ + message: expectMessage, + }); }, ); @@ -337,9 +339,9 @@ describe('Snippet Edit app', () => { it('should flash', () => { // Apollo automatically wraps the resolver's error in a NetworkError - expect(Flash).toHaveBeenCalledWith( - `Can't update snippet: Network error: ${error.message}`, - ); + expect(createFlash).toHaveBeenCalledWith({ + message: `Can't update snippet: Network error: ${error.message}`, + }); }); it('should console error', () => { |