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
554f8e38
Commit
554f8e38
authored
Aug 04, 2018
by
Jasper Maes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rails 5 fix alerts controller spec for post json parameters
parent
9e821920
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
ee/changelogs/unreleased/rails5-fix-alerts-controller-spec.yml
...angelogs/unreleased/rails5-fix-alerts-controller-spec.yml
+5
-0
ee/spec/controllers/projects/prometheus/alerts_controller_spec.rb
...controllers/projects/prometheus/alerts_controller_spec.rb
+5
-1
No files found.
ee/changelogs/unreleased/rails5-fix-alerts-controller-spec.yml
0 → 100644
View file @
554f8e38
---
title
:
Rails 5 fix alerts controller spec for post json parameters
merge_request
:
6795
author
:
Jasper Maes
type
:
fixed
ee/spec/controllers/projects/prometheus/alerts_controller_spec.rb
View file @
554f8e38
...
@@ -100,7 +100,11 @@ describe Projects::Prometheus::AlertsController do
...
@@ -100,7 +100,11 @@ describe Projects::Prometheus::AlertsController do
allow
(
NotificationService
).
to
receive
(
:new
).
and_return
(
notification_service
)
allow
(
NotificationService
).
to
receive
(
:new
).
and_return
(
notification_service
)
expect
(
notification_service
).
to
receive_message_chain
(
:async
,
:prometheus_alerts_fired
).
with
(
project
,
[
alert_params
])
expect
(
notification_service
).
to
receive_message_chain
(
:async
,
:prometheus_alerts_fired
).
with
(
project
,
[
alert_params
])
post
:notify
,
project_params
(
alerts:
[
alert
])
if
Gitlab
.
rails5?
post
:notify
,
params:
project_params
(
alerts:
[
alert
.
to_param
]),
as: :json
else
post
:notify
,
project_params
(
alerts:
[
alert
]),
as: :json
end
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
end
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