Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/jira_connect/index_spec.js')
-rw-r--r--spec/frontend/jira_connect/index_spec.js29
1 files changed, 0 insertions, 29 deletions
diff --git a/spec/frontend/jira_connect/index_spec.js b/spec/frontend/jira_connect/index_spec.js
index b050515c118..0161cfa0273 100644
--- a/spec/frontend/jira_connect/index_spec.js
+++ b/spec/frontend/jira_connect/index_spec.js
@@ -1,10 +1,4 @@
-import waitForPromises from 'helpers/wait_for_promises';
import { initJiraConnect } from '~/jira_connect';
-import { removeSubscription } from '~/jira_connect/api';
-
-jest.mock('~/jira_connect/api', () => ({
- removeSubscription: jest.fn().mockResolvedValue(),
-}));
jest.mock('~/jira_connect/utils', () => ({
getLocation: jest.fn().mockResolvedValue('test/location'),
@@ -15,10 +9,6 @@ describe('initJiraConnect', () => {
setFixtures(`
<a class="js-jira-connect-sign-in" href="https://gitlab.com">Sign In</a>
<a class="js-jira-connect-sign-in" href="https://gitlab.com">Another Sign In</a>
-
- <a href="https://gitlab.com/sub1" class="js-jira-connect-remove-subscription">Remove</a>
- <a href="https://gitlab.com/sub2" class="js-jira-connect-remove-subscription">Remove</a>
- <a href="https://gitlab.com/sub3" class="js-jira-connect-remove-subscription">Remove</a>
`);
await initJiraConnect();
@@ -31,23 +21,4 @@ describe('initJiraConnect', () => {
});
});
});
-
- describe('`remove subscription` buttons', () => {
- describe('on click', () => {
- it('calls `removeSubscription`', () => {
- Array.from(document.querySelectorAll('.js-jira-connect-remove-subscription')).forEach(
- (removeSubscriptionButton) => {
- removeSubscriptionButton.dispatchEvent(new Event('click'));
-
- waitForPromises();
-
- expect(removeSubscription).toHaveBeenCalledWith(removeSubscriptionButton.href);
- expect(removeSubscription).toHaveBeenCalledTimes(1);
-
- removeSubscription.mockClear();
- },
- );
- });
- });
- });
});