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
2206ca29
Commit
2206ca29
authored
Aug 20, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure issue status counts are scoped
Add tests to ensure this
parent
4f028edc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
spec/graphql/resolvers/issue_status_counts_resolver_spec.rb
spec/graphql/resolvers/issue_status_counts_resolver_spec.rb
+8
-2
No files found.
spec/graphql/resolvers/issue_status_counts_resolver_spec.rb
View file @
2206ca29
...
...
@@ -9,10 +9,10 @@ RSpec.describe Resolvers::IssueStatusCountsResolver do
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:project
)
{
create
(
:project
,
group:
group
)
}
let_it_be
(
:issue
)
{
create
(
:issue
,
project:
project
,
state: :opened
,
created_at:
3
.
hours
.
ago
,
updated_at:
3
.
hours
.
ago
)
}
let_it_be
(
:issue
)
{
create
(
:issue
,
project:
project
,
state: :opened
,
created_at:
3
.
hours
.
ago
,
updated_at:
3
.
hours
.
ago
)
}
let_it_be
(
:incident
)
{
create
(
:incident
,
project:
project
,
state: :closed
,
created_at:
1
.
hour
.
ago
,
updated_at:
1
.
hour
.
ago
,
closed_at:
1
.
hour
.
ago
)
}
# Th
is issue should not be included in the coun
ts
# Th
ese issues should not be counted by counts, as they are from other projec
ts
let_it_be
(
:other_project
)
{
create
(
:project
)
}
let_it_be
(
:other_proj_issue
)
{
create
(
:issue
,
state: :opened
,
project:
other_project
)
}
...
...
@@ -41,6 +41,12 @@ RSpec.describe Resolvers::IssueStatusCountsResolver do
it_behaves_like
'returns expected results'
context
'project used as parent'
do
let
(
:parent
)
{
project
}
it_behaves_like
'returns expected results'
end
context
'group used as parent'
do
let
(
:parent
)
{
project
.
group
}
...
...
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