Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/graphql/resolvers/board_list_issues_resolver_spec.rb')
-rw-r--r--spec/graphql/resolvers/board_list_issues_resolver_spec.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/spec/graphql/resolvers/board_list_issues_resolver_spec.rb b/spec/graphql/resolvers/board_list_issues_resolver_spec.rb
index 26040f4ec1a..53d2c8a853c 100644
--- a/spec/graphql/resolvers/board_list_issues_resolver_spec.rb
+++ b/spec/graphql/resolvers/board_list_issues_resolver_spec.rb
@@ -31,12 +31,11 @@ RSpec.describe Resolvers::BoardListIssuesResolver do
end.to raise_error(Gitlab::Graphql::Errors::ArgumentError)
end
- it 'returns issues in the correct order with non-nil relative positions', :aggregate_failures do
+ it 'returns the issues in the correct order' do
# by relative_position and then ID
result = resolve_board_list_issues
- expect(result.map(&:id)).to eq [issue3.id, issue1.id, issue2.id, issue4.id]
- expect(result.map(&:relative_position)).not_to include(nil)
+ expect(result.map(&:id)).to eq [issue1.id, issue3.id, issue2.id, issue4.id]
end
it 'finds only issues matching filters' do
@@ -57,6 +56,13 @@ RSpec.describe Resolvers::BoardListIssuesResolver do
expect(result).to match_array([issue1])
end
+ it 'filters issues by negated issue type' do
+ incident = create(:incident, project: project, labels: [label], relative_position: 15)
+ result = resolve_board_list_issues(args: { filters: { not: { types: ['issue'] } } })
+
+ expect(result).to contain_exactly(incident)
+ end
+
it 'raises an exception if both assignee_username and assignee_wildcard_id are present' do
expect do
resolve_board_list_issues(args: { filters: { assignee_username: ['username'], assignee_wildcard_id: 'NONE' } })
@@ -112,6 +118,6 @@ RSpec.describe Resolvers::BoardListIssuesResolver do
end
def resolve_board_list_issues(args: {}, current_user: user)
- resolve(described_class, obj: list, args: args, ctx: { current_user: current_user }).items
+ resolve(described_class, obj: list, args: args, ctx: { current_user: current_user })
end
end