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/types/issuable_type_spec.rb')
-rw-r--r--spec/graphql/types/issuable_type_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/graphql/types/issuable_type_spec.rb b/spec/graphql/types/issuable_type_spec.rb
index 992a58f524b..cb18bbe2eab 100644
--- a/spec/graphql/types/issuable_type_spec.rb
+++ b/spec/graphql/types/issuable_type_spec.rb
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec.describe GitlabSchema.types['Issuable'] do
it 'returns possible types' do
- expect(described_class.possible_types).to include(Types::IssueType, Types::MergeRequestType)
+ expect(described_class.possible_types).to include(Types::IssueType, Types::MergeRequestType, Types::WorkItemType)
end
describe '.resolve_type' do
@@ -16,6 +16,10 @@ RSpec.describe GitlabSchema.types['Issuable'] do
expect(described_class.resolve_type(build(:merge_request), {})).to eq(Types::MergeRequestType)
end
+ it 'resolves work items' do
+ expect(described_class.resolve_type(build(:work_item), {})).to eq(Types::WorkItemType)
+ end
+
it 'raises an error for invalid types' do
expect { described_class.resolve_type(build(:user), {}) }.to raise_error 'Unsupported issuable type'
end