Commit b0a6a841 authored by Felipe Artur's avatar Felipe Artur

Improve specs and GraphQL field descriptions

parent 12e1ac89
...@@ -24,11 +24,11 @@ module Resolvers ...@@ -24,11 +24,11 @@ module Resolvers
argument :author_username, GraphQL::STRING_TYPE, argument :author_username, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'List epics for author' description: 'Filter epics by author'
argument :label_name, [GraphQL::STRING_TYPE], argument :label_name, [GraphQL::STRING_TYPE],
required: false, required: false,
description: 'List epics that has given label names' description: 'Filter epics by labels'
argument :start_date, Types::TimeType, argument :start_date, Types::TimeType,
required: false, required: false,
......
...@@ -154,25 +154,25 @@ describe Resolvers::EpicResolver do ...@@ -154,25 +154,25 @@ describe Resolvers::EpicResolver do
it 'orders epics by start date in descending order' do it 'orders epics by start date in descending order' do
epics = resolve_epics(sort: 'start_date_desc') epics = resolve_epics(sort: 'start_date_desc')
expect(epics).to match_array([epic3, epic2, epic1]) expect(epics).to eq([epic1, epic2, epic3])
end end
it 'orders epics by start date in ascending order' do it 'orders epics by start date in ascending order' do
epics = resolve_epics(sort: 'start_date_asc') epics = resolve_epics(sort: 'start_date_asc')
expect(epics).to match_array([epic1, epic2, epic3]) expect(epics).to eq([epic3, epic2, epic1])
end end
it 'orders epics by end date in descending order' do it 'orders epics by end date in descending order' do
epics = resolve_epics(sort: 'start_date_asc') epics = resolve_epics(sort: 'end_date_desc')
expect(epics).to match_array([epic1, epic2, epic3]) expect(epics).to eq([epic3, epic2, epic1])
end end
it 'orders epics by end date in ascending order' do 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
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment