diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-14 00:17:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-14 00:17:46 +0000 |
commit | 270353e1ff556a43333f82f171c3a485958126f0 (patch) | |
tree | c7bb4ac335b1e101b9bf92905ec2e8e170c6696c /spec/frontend/jira_connect | |
parent | b2e3da6a38f143a8c782dae4baceae3ed764733d (diff) | |
download | gitlab-ce-270353e1ff556a43333f82f171c3a485958126f0.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/jira_connect')
-rw-r--r-- | spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index_spec.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index_spec.js b/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index_spec.js index d99d8986296..ce6861ff460 100644 --- a/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index_spec.js +++ b/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index_spec.js @@ -6,7 +6,7 @@ import SignInGitlabMultiversion from '~/jira_connect/subscriptions/pages/sign_in import SignInOauthButton from '~/jira_connect/subscriptions/components/sign_in_oauth_button.vue'; import VersionSelectForm from '~/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/version_select_form.vue'; -import { updateInstallation } from '~/jira_connect/subscriptions/api'; +import { updateInstallation, setApiBaseURL } from '~/jira_connect/subscriptions/api'; import { reloadPage, persistBaseUrl, retrieveBaseUrl } from '~/jira_connect/subscriptions/utils'; import { GITLAB_COM_BASE_PATH } from '~/jira_connect/subscriptions/constants'; @@ -72,6 +72,10 @@ describe('SignInGitlabMultiversion', () => { expect(findSetupInstructions().exists()).toBe(true); }); + it('calls setApiBaseURL with correct params', () => { + expect(setApiBaseURL).toHaveBeenCalledWith(mockBasePath); + }); + describe('when SetupInstructions emits `next` event', () => { beforeEach(async () => { findSetupInstructions().vm.$emit('next'); @@ -102,6 +106,10 @@ describe('SignInGitlabMultiversion', () => { expect(findSignInOauthButton().props('gitlabBasePath')).toBe(GITLAB_COM_BASE_PATH); }); + it('does not call setApiBaseURL', () => { + expect(setApiBaseURL).not.toHaveBeenCalled(); + }); + describe('when button emits `sign-in` event', () => { it('emits `sign-in-oauth` event', () => { const button = findSignInOauthButton(); |