diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/graphql/resolvers/design_management/design_resolver_spec.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/graphql/resolvers/design_management/design_resolver_spec.rb')
-rw-r--r-- | spec/graphql/resolvers/design_management/design_resolver_spec.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/graphql/resolvers/design_management/design_resolver_spec.rb b/spec/graphql/resolvers/design_management/design_resolver_spec.rb index 02d7f94612c..e33eaedf167 100644 --- a/spec/graphql/resolvers/design_management/design_resolver_spec.rb +++ b/spec/graphql/resolvers/design_management/design_resolver_spec.rb @@ -6,6 +6,10 @@ RSpec.describe Resolvers::DesignManagement::DesignResolver do include GraphqlHelpers include DesignManagementTestHelpers + specify do + expect(described_class).to have_nullable_graphql_type(::Types::DesignManagement::DesignType) + end + before do enable_design_management end @@ -57,12 +61,21 @@ RSpec.describe Resolvers::DesignManagement::DesignResolver do end context 'the ID belongs to a design on another issue' do - let(:args) { { id: GitlabSchema.id_from_object(design_on_other_issue).to_s } } + let(:args) { { id: global_id_of(design_on_other_issue) } } it 'returns nothing' do expect(resolve_design).to be_nil end end + + context 'the ID does not belong to a design at all' do + let(:args) { { id: global_id_of(issue) } } + let(:msg) { /does not represent an instance of DesignManagement::Design/ } + + it 'complains meaningfully' do + expect { resolve_design }.to raise_error(msg) + end + end end context 'by filename' do |