Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7048dd8b
Commit
7048dd8b
authored
Jul 17, 2020
by
Erick Banks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use let syntax
parent
4c942812
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb
...reate/merge_request/view_merge_request_diff_patch_spec.rb
+8
-9
No files found.
qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb
View file @
7048dd8b
...
@@ -3,31 +3,30 @@
...
@@ -3,31 +3,30 @@
module
QA
module
QA
RSpec
.
describe
'Create'
do
RSpec
.
describe
'Create'
do
describe
'Download merge request patch and diff'
do
describe
'Download merge request patch and diff'
do
before
(
:contex
t
)
do
let
(
:merge_reques
t
)
do
@merge_request
=
Resource
::
MergeRequest
.
fabricate_via_api!
do
|
merge_request
|
Resource
::
MergeRequest
.
fabricate_via_api!
do
|
merge_request
|
merge_request
.
title
=
'This is a merge request'
merge_request
.
title
=
'This is a merge request'
merge_request
.
description
=
'... for downloading patches and diffs'
merge_request
.
description
=
'... for downloading patches and diffs'
end
end
end
end
it
'views the merge request email patches'
do
before
do
Flow
::
Login
.
sign_in
Flow
::
Login
.
sign_in
merge_request
.
visit!
end
@merge_request
.
visit!
it
'views the merge request email patches'
do
Page
::
MergeRequest
::
Show
.
perform
(
&
:view_email_patches
)
Page
::
MergeRequest
::
Show
.
perform
(
&
:view_email_patches
)
expect
(
page
.
text
).
to
start_with
(
'From'
)
expect
(
page
.
text
).
to
start_with
(
'From'
)
expect
(
page
).
to
have_content
(
'Subject: [PATCH] This is a test commit'
)
expect
(
page
).
to
have_content
(
'Subject: [PATCH] This is a test commit'
)
expect
(
page
).
to
have_content
(
"diff --git a/
#{
@merge_request
.
file_name
}
b/
#{
@
merge_request
.
file_name
}
"
)
expect
(
page
).
to
have_content
(
"diff --git a/
#{
merge_request
.
file_name
}
b/
#{
merge_request
.
file_name
}
"
)
end
end
it
'views the merge request plain diff'
do
it
'views the merge request plain diff'
do
Flow
::
Login
.
sign_in
@merge_request
.
visit!
Page
::
MergeRequest
::
Show
.
perform
(
&
:view_plain_diff
)
Page
::
MergeRequest
::
Show
.
perform
(
&
:view_plain_diff
)
expect
(
page
.
text
).
to
start_with
(
"diff --git a/
#{
@merge_request
.
file_name
}
b/
#{
@
merge_request
.
file_name
}
"
)
expect
(
page
.
text
).
to
start_with
(
"diff --git a/
#{
merge_request
.
file_name
}
b/
#{
merge_request
.
file_name
}
"
)
expect
(
page
).
to
have_content
(
'+File Added'
)
expect
(
page
).
to
have_content
(
'+File Added'
)
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment