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
b0a6a841
Commit
b0a6a841
authored
Oct 07, 2019
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve specs and GraphQL field descriptions
parent
12e1ac89
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
ee/app/graphql/resolvers/epic_resolver.rb
ee/app/graphql/resolvers/epic_resolver.rb
+2
-2
ee/spec/graphql/resolvers/epic_resolver_spec.rb
ee/spec/graphql/resolvers/epic_resolver_spec.rb
+6
-6
No files found.
ee/app/graphql/resolvers/epic_resolver.rb
View file @
b0a6a841
...
...
@@ -24,11 +24,11 @@ module Resolvers
argument
:author_username
,
GraphQL
::
STRING_TYPE
,
required:
false
,
description:
'
List epics for
author'
description:
'
Filter epics by
author'
argument
:label_name
,
[
GraphQL
::
STRING_TYPE
],
required:
false
,
description:
'
List epics that has given label name
s'
description:
'
Filter epics by label
s'
argument
:start_date
,
Types
::
TimeType
,
required:
false
,
...
...
ee/spec/graphql/resolvers/epic_resolver_spec.rb
View file @
b0a6a841
...
...
@@ -154,25 +154,25 @@ describe Resolvers::EpicResolver do
it
'orders epics by start date in descending order'
do
epics
=
resolve_epics
(
sort:
'start_date_desc'
)
expect
(
epics
).
to
match_array
([
epic3
,
epic2
,
epic1
])
expect
(
epics
).
to
eq
([
epic1
,
epic2
,
epic3
])
end
it
'orders epics by start date in ascending order'
do
epics
=
resolve_epics
(
sort:
'start_date_asc'
)
expect
(
epics
).
to
match_array
([
epic1
,
epic2
,
epic3
])
expect
(
epics
).
to
eq
([
epic3
,
epic2
,
epic1
])
end
it
'orders epics by end date in descending order'
do
epics
=
resolve_epics
(
sort:
'
start_date_a
sc'
)
epics
=
resolve_epics
(
sort:
'
end_date_de
sc'
)
expect
(
epics
).
to
match_array
([
epic1
,
epic2
,
epic3
])
expect
(
epics
).
to
eq
([
epic3
,
epic2
,
epic1
])
end
it
'orders epics by end date in ascending order'
do
epics
=
resolve_epics
(
sort:
'
start
_date_asc'
)
epics
=
resolve_epics
(
sort:
'
end
_date_asc'
)
expect
(
epics
).
to
match_array
([
epic3
,
epic2
,
epic1
])
expect
(
epics
).
to
eq
([
epic1
,
epic2
,
epic3
])
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