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
76b7307a
Commit
76b7307a
authored
May 11, 2020
by
syasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add status API test
parent
7c50c465
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
spec/requests/api/graphql/project/alert_management/alerts_spec.rb
...uests/api/graphql/project/alert_management/alerts_spec.rb
+9
-0
No files found.
spec/requests/api/graphql/project/alert_management/alerts_spec.rb
View file @
76b7307a
...
@@ -92,6 +92,15 @@ describe 'getting Alert Management Alerts' do
...
@@ -92,6 +92,15 @@ describe 'getting Alert Management Alerts' do
it
{
expect
(
first_alert
[
'iid'
]).
to
eq
(
resolved_alert
.
iid
.
to_s
)
}
it
{
expect
(
first_alert
[
'iid'
]).
to
eq
(
resolved_alert
.
iid
.
to_s
)
}
end
end
context
'with statuses given'
do
let
(
:params
)
{
'statuses: [TRIGGERED, ACKNOWLEDGED]'
}
it_behaves_like
'a working graphql query'
it
{
expect
(
alerts
.
size
).
to
eq
(
1
)
}
it
{
expect
(
first_alert
[
'iid'
]).
to
eq
(
triggered_alert
.
iid
.
to_s
)
}
end
context
'sorting data given'
do
context
'sorting data given'
do
let
(
:params
)
{
'sort: SEVERITY_DESC'
}
let
(
:params
)
{
'sort: SEVERITY_DESC'
}
let
(
:iids
)
{
alerts
.
map
{
|
a
|
a
[
'iid'
]
}
}
let
(
:iids
)
{
alerts
.
map
{
|
a
|
a
[
'iid'
]
}
}
...
...
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