diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-16 18:08:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-16 18:08:46 +0000 |
commit | aa0f0e992153e84e1cdec8a1c7310d5eb93a9f8f (patch) | |
tree | 4a662bc77fb43e1d1deec78cc7a95d911c0da1c5 /spec/graphql | |
parent | d47f9d2304dbc3a23bba7fe7a5cd07218eeb41cd (diff) | |
download | gitlab-ce-aa0f0e992153e84e1cdec8a1c7310d5eb93a9f8f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/graphql')
-rw-r--r-- | spec/graphql/types/environment_type_spec.rb | 17 | ||||
-rw-r--r-- | spec/graphql/types/project_type_spec.rb | 9 |
2 files changed, 25 insertions, 1 deletions
diff --git a/spec/graphql/types/environment_type_spec.rb b/spec/graphql/types/environment_type_spec.rb new file mode 100644 index 00000000000..cf30893b3ca --- /dev/null +++ b/spec/graphql/types/environment_type_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe GitlabSchema.types['Environment'] do + it { expect(described_class.graphql_name).to eq('Environment') } + + it 'has the expected fields' do + expected_fields = %w[ + name id + ] + + is_expected.to have_graphql_fields(*expected_fields) + end + + it { is_expected.to require_graphql_authorizations(:read_environment) } +end diff --git a/spec/graphql/types/project_type_spec.rb b/spec/graphql/types/project_type_spec.rb index 7bed1f72e0b..ac2d2d6f7f0 100644 --- a/spec/graphql/types/project_type_spec.rb +++ b/spec/graphql/types/project_type_spec.rb @@ -23,7 +23,7 @@ describe GitlabSchema.types['Project'] do only_allow_merge_if_all_discussions_are_resolved printing_merge_request_link_enabled namespace group statistics repository merge_requests merge_request issues issue pipelines removeSourceBranchAfterMerge sentryDetailedError snippets - grafanaIntegration autocloseReferencedIssues suggestion_commit_message + grafanaIntegration autocloseReferencedIssues suggestion_commit_message environments ] is_expected.to include_graphql_fields(*expected_fields) @@ -70,4 +70,11 @@ describe GitlabSchema.types['Project'] do it { is_expected.to have_graphql_type(Types::GrafanaIntegrationType) } it { is_expected.to have_graphql_resolver(Resolvers::Projects::GrafanaIntegrationResolver) } end + + describe 'environments field' do + subject { described_class.fields['environments'] } + + it { is_expected.to have_graphql_type(Types::EnvironmentType.connection_type) } + it { is_expected.to have_graphql_resolver(Resolvers::EnvironmentsResolver) } + end end |