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
bf7a1c02
Commit
bf7a1c02
authored
Nov 19, 2020
by
Kev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve reverting_commit test
parent
dc6a0ec1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
spec/models/commit_spec.rb
spec/models/commit_spec.rb
+2
-5
No files found.
spec/models/commit_spec.rb
View file @
bf7a1c02
...
...
@@ -754,23 +754,20 @@ eos
let
(
:user
)
{
create
(
:user
)
}
let
(
:issue
)
{
create
(
:issue
,
author:
user
,
project:
project
)
}
it
'returns t
rue if the commit has been reverted
'
do
it
'returns t
he reverting commit
'
do
create
(
:note_on_issue
,
noteable:
issue
,
system:
true
,
note:
commit
.
revert_description
(
user
),
project:
issue
.
project
)
reverting_commit
=
nil
expect_next_instance_of
(
Commit
)
do
|
revert_commit
|
reverting_commit
=
revert_commit
expect
(
revert_commit
).
to
receive
(
:reverts_commit?
)
.
with
(
commit
,
user
)
.
and_return
(
true
)
end
expect
(
commit
.
reverting_commit
(
user
,
issue
.
notes_with_associations
)).
to
eq
(
reverting_
commit
)
expect
(
commit
.
reverting_commit
(
user
,
issue
.
notes_with_associations
)).
to
eq
(
commit
)
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