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
a1125248
Commit
a1125248
authored
May 25, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return all persisted issues regardless of success or failure on creation
parent
bd87c15d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
app/controllers/projects/issue_links_controller.rb
app/controllers/projects/issue_links_controller.rb
+1
-5
spec/controllers/projects/issue_links_controller_spec.rb
spec/controllers/projects/issue_links_controller_spec.rb
+2
-1
No files found.
app/controllers/projects/issue_links_controller.rb
View file @
a1125248
...
...
@@ -11,11 +11,7 @@ module Projects
opts
=
params
.
slice
(
:issue_references
)
result
=
IssueLinks
::
CreateService
.
new
(
issue
,
current_user
,
opts
).
execute
if
result
[
:status
]
==
:success
render
json:
{
result:
result
,
issues:
issues
},
status:
result
[
:http_status
]
else
render
json:
{
result:
result
},
status:
result
[
:http_status
]
end
render
json:
{
result:
result
,
issues:
issues
},
status:
result
[
:http_status
]
end
def
destroy
...
...
spec/controllers/projects/issue_links_controller_spec.rb
View file @
a1125248
...
...
@@ -82,7 +82,8 @@ describe Projects::IssueLinksController, type: :controller do
it
'returns failure JSON'
do
is_expected
.
to
have_http_status
(
401
)
expect
(
json_response
).
to
eq
(
'result'
=>
{
'http_status'
=>
401
,
'status'
=>
'error'
})
expect
(
json_response
).
to
eq
(
'result'
=>
{
'http_status'
=>
401
,
'status'
=>
'error'
},
'issues'
=>
list_service_response
)
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