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
20594de8
Commit
20594de8
authored
Apr 04, 2019
by
rpereira2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use environment_params when defining expected_params
parent
3888b4d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
spec/controllers/projects/environments/prometheus_api_controller_spec.rb
...s/projects/environments/prometheus_api_controller_spec.rb
+8
-10
No files found.
spec/controllers/projects/environments/prometheus_api_controller_spec.rb
View file @
20594de8
...
...
@@ -16,13 +16,11 @@ describe Projects::Environments::PrometheusApiController do
let
(
:prometheus_proxy_service
)
{
instance_double
(
Prometheus
::
ProxyService
)
}
let
(
:expected_params
)
do
ActionController
::
Parameters
.
new
(
"query"
=>
"1"
,
"id"
=>
environment
.
id
.
to_s
,
"namespace_id"
=>
project
.
namespace
.
name
,
"project_id"
=>
project
.
name
,
"proxy_path"
=>
"query"
,
"controller"
=>
"projects/environments/prometheus_api"
,
"action"
=>
"proxy"
environment_params
(
proxy_path:
'query'
,
controller:
'projects/environments/prometheus_api'
,
action:
'proxy'
)
).
permit!
end
...
...
@@ -144,9 +142,9 @@ describe Projects::Environments::PrometheusApiController do
def
environment_params
(
params
=
{})
{
id:
environment
.
id
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
environment
.
id
.
to_s
,
namespace_id:
project
.
namespace
.
name
,
project_id:
project
.
name
,
proxy_path:
'query'
,
query:
'1'
}.
merge
(
params
)
...
...
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