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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
d8e440c8
Commit
d8e440c8
authored
Jan 19, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
a5afcf0f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
lib/api/helpers.rb
lib/api/helpers.rb
+1
-1
spec/requests/api/helpers_spec.rb
spec/requests/api/helpers_spec.rb
+2
-1
No files found.
lib/api/helpers.rb
View file @
d8e440c8
...
...
@@ -226,7 +226,7 @@ module API
end
def
render_api_error!
(
message
,
status
)
error!
({
'message'
=>
message
},
status
)
error!
({
'message'
=>
message
},
status
,
header
)
end
def
handle_api_exception
(
exception
)
...
...
spec/requests/api/helpers_spec.rb
View file @
d8e440c8
...
...
@@ -12,6 +12,7 @@ describe API::Helpers, api: true do
let
(
:params
)
{
{}
}
let
(
:env
)
{
{
'REQUEST_METHOD'
=>
'GET'
}
}
let
(
:request
)
{
Rack
::
Request
.
new
(
env
)
}
let
(
:header
)
{
}
def
set_env
(
user_or_token
,
identifier
)
clear_env
...
...
@@ -46,7 +47,7 @@ describe API::Helpers, api: true do
allow_any_instance_of
(
self
.
class
).
to
receive
(
:doorkeeper_guard
){
value
}
end
def
error!
(
message
,
status
)
def
error!
(
message
,
status
,
header
)
raise
Exception
.
new
(
"
#{
status
}
-
#{
message
}
"
)
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