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
d03d0d7b
Commit
d03d0d7b
authored
Sep 08, 2020
by
gaga5lala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
REFACTOR: fix code review comments2
- rspec rewording - argument type
parent
09ba3e45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/api/todos.rb
lib/api/todos.rb
+1
-1
spec/requests/api/todos_spec.rb
spec/requests/api/todos_spec.rb
+2
-2
No files found.
lib/api/todos.rb
View file @
d03d0d7b
...
...
@@ -43,7 +43,7 @@ module API
optional
:action
,
String
,
values:
Todo
::
ACTION_NAMES
.
values
.
map
(
&
:to_s
)
optional
:author_id
,
Integer
optional
:state
,
String
,
values:
Todo
.
state_machine
.
states
.
map
(
&
:name
).
map
(
&
:to_s
)
optional
:type
,
Array
[
String
]
,
values:
TodosFinder
.
todo_types
optional
:type
,
String
,
values:
TodosFinder
.
todo_types
optional
:project_id
,
Integer
optional
:group_id
,
Integer
end
...
...
spec/requests/api/todos_spec.rb
View file @
d03d0d7b
...
...
@@ -43,14 +43,14 @@ RSpec.describe API::Todos do
end
context
"invalid state"
do
it
'returns
argument error
'
do
it
'returns
400
'
do
get
api
(
'/todos'
,
john_doe
),
params:
{
state:
'InvalidState'
}
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
end
end
context
"invalid type"
do
it
'returns
argument error
'
do
it
'returns
400
'
do
get
api
(
'/todos'
,
john_doe
),
params:
{
type:
'InvalidType'
}
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
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