diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 14:34:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 14:34:42 +0000 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /spec/graphql/types/project_type_spec.rb | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) | |
download | gitlab-ce-9f46488805e86b1bc341ea1620b866016c2ce5ed.tar.gz |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'spec/graphql/types/project_type_spec.rb')
-rw-r--r-- | spec/graphql/types/project_type_spec.rb | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/spec/graphql/types/project_type_spec.rb b/spec/graphql/types/project_type_spec.rb index 6ea852190c9..6368f743720 100644 --- a/spec/graphql/types/project_type_spec.rb +++ b/spec/graphql/types/project_type_spec.rb @@ -3,11 +3,11 @@ require 'spec_helper' describe GitlabSchema.types['Project'] do - it { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Project) } + specify { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Project) } - it { expect(described_class.graphql_name).to eq('Project') } + specify { expect(described_class.graphql_name).to eq('Project') } - it { expect(described_class).to require_graphql_authorizations(:read_project) } + specify { expect(described_class).to require_graphql_authorizations(:read_project) } it 'has the expected fields' do expected_fields = %w[ @@ -24,7 +24,8 @@ describe GitlabSchema.types['Project'] do namespace group statistics repository merge_requests merge_request issues issue pipelines removeSourceBranchAfterMerge sentryDetailedError snippets grafanaIntegration autocloseReferencedIssues suggestion_commit_message environments - boards jira_import_status jira_imports services + boards jira_import_status jira_imports services releases release + alert_management_alerts alert_management_alert alert_management_alert_status_counts ] expect(described_class).to include_graphql_fields(*expected_fields) @@ -96,4 +97,18 @@ describe GitlabSchema.types['Project'] do it { is_expected.to have_graphql_type(Types::Projects::ServiceType.connection_type) } end + + describe 'releases field' do + subject { described_class.fields['release'] } + + it { is_expected.to have_graphql_type(Types::ReleaseType) } + it { is_expected.to have_graphql_resolver(Resolvers::ReleaseResolver) } + end + + describe 'release field' do + subject { described_class.fields['releases'] } + + it { is_expected.to have_graphql_type(Types::ReleaseType.connection_type) } + it { is_expected.to have_graphql_resolver(Resolvers::ReleasesResolver) } + end end |