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
1d5c7429
Commit
1d5c7429
authored
Feb 07, 2017
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing specs from backports
parent
1eb50566
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
lib/api/v3/merge_requests.rb
lib/api/v3/merge_requests.rb
+3
-3
spec/services/system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+5
-5
No files found.
lib/api/v3/merge_requests.rb
View file @
1d5c7429
...
...
@@ -294,7 +294,7 @@ module API
merge_request
=
user_project
.
merge_requests
.
find
(
params
[
:merge_request_id
])
authorize!
:read_merge_request
,
merge_request
present
merge_request
,
with:
Entities
::
MergeRequestApprovals
,
current_user:
current_user
present
merge_request
,
with:
::
API
::
Entities
::
MergeRequestApprovals
,
current_user:
current_user
end
# Approve a merge request
...
...
@@ -314,7 +314,7 @@ module API
.
new
(
user_project
,
current_user
)
.
execute
(
merge_request
)
present
merge_request
,
with:
Entities
::
MergeRequestApprovals
,
current_user:
current_user
present
merge_request
,
with:
::
API
::
Entities
::
MergeRequestApprovals
,
current_user:
current_user
end
delete
"
#{
path
}
/unapprove"
do
...
...
@@ -326,7 +326,7 @@ module API
.
new
(
user_project
,
current_user
)
.
execute
(
merge_request
)
present
merge_request
,
with:
Entities
::
MergeRequestApprovals
,
current_user:
current_user
present
merge_request
,
with:
::
API
::
Entities
::
MergeRequestApprovals
,
current_user:
current_user
end
end
end
...
...
spec/services/system_note_service_spec.rb
View file @
1d5c7429
...
...
@@ -783,13 +783,13 @@ describe SystemNoteService, services: true do
it
'sets the note text'
do
noteable
.
update_attribute
(
:time_estimate
,
277200
)
expect
(
subject
.
note
).
to
eq
"
Changed time estimate of this issu
e to 1w 4d 5h"
expect
(
subject
.
note
).
to
eq
"
changed time estimat
e to 1w 4d 5h"
end
end
context
'without a time estimate'
do
it
'sets the note text'
do
expect
(
subject
.
note
).
to
eq
"
Removed time estimate on this issu
e"
expect
(
subject
.
note
).
to
eq
"
removed time estimat
e"
end
end
end
...
...
@@ -813,7 +813,7 @@ describe SystemNoteService, services: true do
it
'sets the note text'
do
spend_time!
(
277200
)
expect
(
subject
.
note
).
to
eq
"
Added 1w 4d 5h of time spent on this merge reques
t"
expect
(
subject
.
note
).
to
eq
"
added 1w 4d 5h of time spen
t"
end
end
...
...
@@ -821,7 +821,7 @@ describe SystemNoteService, services: true do
it
'sets the note text'
do
spend_time!
(
-
277200
)
expect
(
subject
.
note
).
to
eq
"
Subtracted 1w 4d 5h of time spent on this merge reques
t"
expect
(
subject
.
note
).
to
eq
"
subtracted 1w 4d 5h of time spen
t"
end
end
...
...
@@ -829,7 +829,7 @@ describe SystemNoteService, services: true do
it
'sets the note text'
do
spend_time!
(
:reset
)
expect
(
subject
.
note
).
to
eq
"
Removed time spent on this merge reques
t"
expect
(
subject
.
note
).
to
eq
"
removed time spen
t"
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