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
e367b443
Commit
e367b443
authored
Jul 20, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update spec names to be more appropriate
parent
99d9728a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
spec/lib/gitlab/alert_management/alert_status_counts_spec.rb
spec/lib/gitlab/alert_management/alert_status_counts_spec.rb
+4
-4
spec/requests/api/graphql/project/alert_management/alert_status_counts_spec.rb
...phql/project/alert_management/alert_status_counts_spec.rb
+3
-3
No files found.
spec/lib/gitlab/alert_management/alert_status_counts_spec.rb
View file @
e367b443
...
...
@@ -5,9 +5,9 @@ require 'spec_helper'
RSpec
.
describe
Gitlab
::
AlertManagement
::
AlertStatusCounts
do
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:alert_
1
)
{
create
(
:alert_management_alert
,
:resolved
,
project:
project
)
}
let_it_be
(
:alert_
2
)
{
create
(
:alert_management_alert
,
:ignored
,
project:
project
)
}
let_it_be
(
:alert_
3
)
{
create
(
:alert_management_alert
)
}
let_it_be
(
:alert_
resolved
)
{
create
(
:alert_management_alert
,
:resolved
,
project:
project
)
}
let_it_be
(
:alert_
ignored
)
{
create
(
:alert_management_alert
,
:ignored
,
project:
project
)
}
let_it_be
(
:alert_
triggered
)
{
create
(
:alert_management_alert
)
}
let
(
:params
)
{
{}
}
describe
'#execute'
do
...
...
@@ -52,7 +52,7 @@ RSpec.describe Gitlab::AlertManagement::AlertStatusCounts do
end
context
'when search param is included'
do
let
(
:params
)
{
{
search:
alert_
1
.
title
}
}
let
(
:params
)
{
{
search:
alert_
resolved
.
title
}
}
it
'returns the correct countss'
do
expect
(
counts
.
open
).
to
eq
(
0
)
...
...
spec/requests/api/graphql/project/alert_management/alert_status_counts_spec.rb
View file @
e367b443
...
...
@@ -6,8 +6,8 @@ RSpec.describe 'getting Alert Management Alert counts by status' do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:alert_
1
)
{
create
(
:alert_management_alert
,
:resolved
,
project:
project
)
}
let_it_be
(
:alert_
2
)
{
create
(
:alert_management_alert
,
project:
project
)
}
let_it_be
(
:alert_
resolved
)
{
create
(
:alert_management_alert
,
:resolved
,
project:
project
)
}
let_it_be
(
:alert_
triggered
)
{
create
(
:alert_management_alert
,
project:
project
)
}
let_it_be
(
:other_project_alert
)
{
create
(
:alert_management_alert
)
}
let
(
:params
)
{
{}
}
...
...
@@ -58,7 +58,7 @@ RSpec.describe 'getting Alert Management Alert counts by status' do
end
context
'with search criteria'
do
let
(
:params
)
{
{
search:
alert_
1
.
title
}
}
let
(
:params
)
{
{
search:
alert_
resolved
.
title
}
}
it_behaves_like
'a working graphql query'
it
'returns the correct counts for each status'
do
...
...
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