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
ab3578fb
Commit
ab3578fb
authored
Mar 26, 2020
by
Gary Holtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds a few commit related assertions
parent
5a444957
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
spec/services/merge_requests/merge_service_spec.rb
spec/services/merge_requests/merge_service_spec.rb
+8
-0
No files found.
spec/services/merge_requests/merge_service_spec.rb
View file @
ab3578fb
...
...
@@ -48,12 +48,20 @@ describe MergeRequests::MergeService do
end
it
'is idempotent'
do
repository
=
project
.
repository
commit_count
=
repository
.
commit_count
merge_commit
=
merge_request
.
merge_commit
.
id
# a first invocation of execute is performed on the before block
service
.
execute
(
merge_request
)
expect
(
merge_request
.
merge_error
).
to
be_falsey
expect
(
merge_request
).
to
be_valid
expect
(
merge_request
).
to
be_merged
expect
(
repository
.
commits_by
(
oids:
[
merge_commit
]).
size
).
to
eq
(
1
)
expect
(
repository
.
commit_count
).
to
eq
(
commit_count
)
expect
(
merge_request
.
in_progress_merge_commit_sha
).
to
be_nil
end
context
'when squashing'
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