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
8ac990b4
Commit
8ac990b4
authored
Nov 02, 2018
by
Jasper Maes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rails5: fix operations controller spec nil parameter
parent
d57b6519
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
ee/changelogs/unreleased/rails5-fix-ops-controller-spec.yml
ee/changelogs/unreleased/rails5-fix-ops-controller-spec.yml
+5
-0
ee/spec/controllers/operations_controller_spec.rb
ee/spec/controllers/operations_controller_spec.rb
+2
-2
No files found.
ee/changelogs/unreleased/rails5-fix-ops-controller-spec.yml
0 → 100644
View file @
8ac990b4
---
title
:
'
Rails5:
fix
operations
controller
spec
nil
parameter'
merge_request
:
8209
author
:
Jasper Maes
type
:
other
ee/spec/controllers/operations_controller_spec.rb
View file @
8ac990b4
...
@@ -181,13 +181,13 @@ describe OperationsController do
...
@@ -181,13 +181,13 @@ describe OperationsController do
end
end
it
'does not add invalid project ids'
do
it
'does not add invalid project ids'
do
post
:create
,
project_ids:
[
nil
,
-
1
,
'-2'
]
post
:create
,
project_ids:
[
''
,
-
1
,
'-2'
]
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
).
to
match_schema
(
'dashboard/operations/add'
,
dir:
'ee'
)
expect
(
json_response
).
to
match_schema
(
'dashboard/operations/add'
,
dir:
'ee'
)
expect
(
json_response
[
'added'
]).
to
be_empty
expect
(
json_response
[
'added'
]).
to
be_empty
expect
(
json_response
[
'duplicate'
]).
to
be_empty
expect
(
json_response
[
'duplicate'
]).
to
be_empty
expect
(
json_response
[
'invalid'
]).
to
contain_exactly
(
nil
,
'-1'
,
'-2'
)
expect
(
json_response
[
'invalid'
]).
to
contain_exactly
(
''
,
'-1'
,
'-2'
)
user
.
reload
user
.
reload
expect
(
user
.
ops_dashboard_projects
).
to
be_empty
expect
(
user
.
ops_dashboard_projects
).
to
be_empty
...
...
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