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
55c9b2e5
Commit
55c9b2e5
authored
Mar 08, 2022
by
Mario Celi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor work_items/types_resolver_spec. Fix subject
parent
d92926ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
spec/graphql/resolvers/work_items/types_resolver_spec.rb
spec/graphql/resolvers/work_items/types_resolver_spec.rb
+5
-3
No files found.
spec/graphql/resolvers/work_items/types_resolver_spec.rb
View file @
55c9b2e5
...
...
@@ -14,16 +14,18 @@ RSpec.describe Resolvers::WorkItems::TypesResolver do
end
shared_examples
'a work item type resolver'
do
subject
(
:result
)
{
resolve
(
described_class
,
obj:
object
)
}
let
(
:args
)
{
{}
}
subject
(
:result
)
{
resolve
(
described_class
,
obj:
object
,
args:
args
)
}
it
'returns all default work item types'
do
expect
(
result
.
to_a
).
to
match
(
WorkItems
::
Type
.
default
.
order_by_name_asc
)
end
context
'when requesting taskable types'
do
it
'returns only taskable types'
do
result
=
resolve
(
described_class
,
obj:
group
,
args:
{
taskable:
true
})
let
(
:args
)
{
{
taskable:
true
}
}
it
'returns only taskable types'
do
expect
(
result
.
to_a
).
to
contain_exactly
(
WorkItems
::
Type
.
default_by_type
(
:task
))
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