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
578b0c2c
Commit
578b0c2c
authored
May 11, 2020
by
syasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for alert status mutation
parent
271d4ee6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
spec/requests/api/graphql/mutations/alert_management/alerts/update_alert_status_spec.rb
...tions/alert_management/alerts/update_alert_status_spec.rb
+42
-0
No files found.
spec/requests/api/graphql/mutations/alert_management/alerts/update_alert_status_spec.rb
0 → 100644
View file @
578b0c2c
# frozen_string_literal: true
require
'spec_helper'
describe
'Setting the status of an alert'
do
include
GraphqlHelpers
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:alert
)
{
create
(
:alert_management_alert
,
project:
project
)
}
let
(
:input
)
{
{
status:
'ACKNOWLEDGED'
}
}
let
(
:mutation
)
do
variables
=
{
project_path:
project
.
full_path
,
iid:
alert
.
iid
.
to_s
}
graphql_mutation
(
:update_alert_status
,
variables
.
merge
(
input
),
<<~
QL
clientMutationId
errors
alert {
iid
status
}
QL
)
end
let
(
:mutation_response
)
{
graphql_mutation_response
(
:update_alert_status
)
}
before
do
project
.
add_developer
(
user
)
end
it
'updates the status of the alert'
do
post_graphql_mutation
(
mutation
,
current_user:
user
)
expect
(
response
).
to
have_gitlab_http_status
(
:success
)
expect
(
mutation_response
[
'alert'
][
'status'
]).
to
eq
(
input
[
:status
])
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