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
cbf93adf
Commit
cbf93adf
authored
Feb 05, 2020
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check for blank param value using allow_blank
parent
ed364588
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
lib/api/error_tracking.rb
lib/api/error_tracking.rb
+1
-1
spec/requests/api/error_tracking_spec.rb
spec/requests/api/error_tracking_spec.rb
+8
-0
No files found.
lib/api/error_tracking.rb
View file @
cbf93adf
...
...
@@ -29,7 +29,7 @@ module API
success
Entities
::
ErrorTracking
::
ProjectSetting
end
params
do
requires
:active
,
type:
Boolean
,
desc:
'Specifying whether to enable or disable error tracking settings'
requires
:active
,
type:
Boolean
,
desc:
'Specifying whether to enable or disable error tracking settings'
,
allow_blank:
false
end
patch
':id/error_tracking/settings/'
do
...
...
spec/requests/api/error_tracking_spec.rb
View file @
cbf93adf
...
...
@@ -55,6 +55,14 @@ describe API::ErrorTracking do
expect
(
json_response
[
'error'
])
.
to
eq
(
'active is invalid'
)
end
it
'returns 400 if active is empty'
do
make_patch_request
(
active:
''
)
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
expect
(
json_response
[
'error'
])
.
to
eq
(
'active is empty'
)
end
end
context
'without a project setting'
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