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
68c0a4cd
Commit
68c0a4cd
authored
Jul 17, 2020
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add API specs for cherry-pick and revert dry-run
parent
620e1eca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
spec/requests/api/commits_spec.rb
spec/requests/api/commits_spec.rb
+20
-0
No files found.
spec/requests/api/commits_spec.rb
View file @
68c0a4cd
...
...
@@ -1462,6 +1462,16 @@ RSpec.describe API::Commits do
expect
(
json_response
[
'author_name'
]).
to
eq
(
commit
.
author_name
)
expect
(
json_response
[
'committer_name'
]).
to
eq
(
user
.
name
)
end
it
'supports dry-run without applying changes'
do
head
=
project
.
commit
(
branch
)
post
api
(
route
,
current_user
),
params:
{
branch:
branch
,
dry_run:
true
}
expect
(
response
).
to
have_gitlab_http_status
(
:no_content
)
expect
(
response
.
body
).
to
be_empty
expect
(
project
.
commit
(
branch
)).
to
eq
(
head
)
end
end
context
'when repository is disabled'
do
...
...
@@ -1623,6 +1633,16 @@ RSpec.describe API::Commits do
expect
(
json_response
[
'committer_name'
]).
to
eq
(
user
.
name
)
expect
(
json_response
[
'parent_ids'
]).
to
contain_exactly
(
commit_id
)
end
it
'supports dry-run without applying changes'
do
head
=
project
.
commit
(
branch
)
post
api
(
route
,
current_user
),
params:
{
branch:
branch
,
dry_run:
true
}
expect
(
response
).
to
have_gitlab_http_status
(
:no_content
)
expect
(
response
.
body
).
to
be_empty
expect
(
project
.
commit
(
branch
)).
to
eq
(
head
)
end
end
context
'when repository is disabled'
do
...
...
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