summaryrefslogtreecommitdiff
path: root/spec/frontend/vue_merge_request_widget
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 12:07:21 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 12:07:21 +0000
commitef58231bd6702495b8d2d1e7ddc2ad66d1a7dc70 (patch)
tree49d44d81aa99c000e78e692bca18fdcaa134673a /spec/frontend/vue_merge_request_widget
parent0a921554d8c33ccbbd1f2edcee8cd70a0ecfd1a2 (diff)
downloadgitlab-ce-ef58231bd6702495b8d2d1e7ddc2ad66d1a7dc70.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_merge_request_widget')
-rw-r--r--spec/frontend/vue_merge_request_widget/mr_widget_how_to_merge_modal_spec.js16
1 files changed, 2 insertions, 14 deletions
diff --git a/spec/frontend/vue_merge_request_widget/mr_widget_how_to_merge_modal_spec.js b/spec/frontend/vue_merge_request_widget/mr_widget_how_to_merge_modal_spec.js
index d038660e6d3..015d394312a 100644
--- a/spec/frontend/vue_merge_request_widget/mr_widget_how_to_merge_modal_spec.js
+++ b/spec/frontend/vue_merge_request_widget/mr_widget_how_to_merge_modal_spec.js
@@ -34,7 +34,7 @@ describe('MRWidgetHowToMerge', () => {
});
it('renders a selection of markdown fields', () => {
- expect(findInstructionsFields().length).toBe(3);
+ expect(findInstructionsFields().length).toBe(2);
});
it('renders a tip including a link to docs when a valid link is present', () => {
@@ -48,23 +48,11 @@ describe('MRWidgetHowToMerge', () => {
it('should render different instructions based on if the user can merge', () => {
mountComponent({ props: { canMerge: true } });
- expect(findInstructionsFields().at(2).text()).toContain('git push origin');
- });
-
- it('should render different instructions based on if the merge is based off a fork', () => {
- mountComponent({ props: { isFork: true } });
- expect(findInstructionsFields().at(0).text()).toContain('FETCH_HEAD');
- });
-
- it('escapes the target branch name shell-secure', () => {
- mountComponent({ props: { targetBranch: '";echo$IFS"you_shouldnt_run_this' } });
-
- expect(findInstructionsFields().at(1).text()).toContain('\'";echo$IFS"you_shouldnt_run_this\'');
+ expect(findInstructionsFields().at(1).text()).toContain('git push origin');
});
it('escapes the source branch name shell-secure', () => {
mountComponent({ props: { sourceBranch: 'branch-of-$USER' } });
-
expect(findInstructionsFields().at(0).text()).toContain("'branch-of-$USER'");
});
});