diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-19 00:09:15 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-19 00:09:15 +0000 |
commit | 60f63d15794e62c4bac9756445f618cd9acb8654 (patch) | |
tree | 30c2b2dc678995dd332b32672f9faa460fabdb79 /spec/graphql | |
parent | 93d7441cc98c1db55797a2181a3d9f4b3d26d82c (diff) | |
download | gitlab-ce-60f63d15794e62c4bac9756445f618cd9acb8654.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/graphql')
-rw-r--r-- | spec/graphql/types/board_type_spec.rb | 15 | ||||
-rw-r--r-- | spec/graphql/types/group_type_spec.rb | 10 | ||||
-rw-r--r-- | spec/graphql/types/project_type_spec.rb | 7 |
3 files changed, 31 insertions, 1 deletions
diff --git a/spec/graphql/types/board_type_spec.rb b/spec/graphql/types/board_type_spec.rb new file mode 100644 index 00000000000..9d18065bbcd --- /dev/null +++ b/spec/graphql/types/board_type_spec.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe GitlabSchema.types['Board'] do + it { expect(described_class.graphql_name).to eq('Board') } + + it { expect(described_class).to require_graphql_authorizations(:read_board) } + + it 'has specific fields' do + expected_fields = %w[id name] + + is_expected.to include_graphql_fields(*expected_fields) + end +end diff --git a/spec/graphql/types/group_type_spec.rb b/spec/graphql/types/group_type_spec.rb index 6a0028f6529..240dd9fa5e2 100644 --- a/spec/graphql/types/group_type_spec.rb +++ b/spec/graphql/types/group_type_spec.rb @@ -16,9 +16,17 @@ describe GitlabSchema.types['Group'] do web_url avatar_url share_with_group_lock project_creation_level subgroup_creation_level require_two_factor_authentication two_factor_grace_period auto_devops_enabled emails_disabled - mentions_disabled parent + mentions_disabled parent boards ] is_expected.to include_graphql_fields(*expected_fields) end + + describe 'boards field' do + subject { described_class.fields['boards'] } + + it 'returns boards' do + is_expected.to have_graphql_type(Types::BoardType.connection_type) + end + end end diff --git a/spec/graphql/types/project_type_spec.rb b/spec/graphql/types/project_type_spec.rb index ac2d2d6f7f0..9c6d1e3f35c 100644 --- a/spec/graphql/types/project_type_spec.rb +++ b/spec/graphql/types/project_type_spec.rb @@ -24,6 +24,7 @@ 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 ] is_expected.to include_graphql_fields(*expected_fields) @@ -77,4 +78,10 @@ describe GitlabSchema.types['Project'] do it { is_expected.to have_graphql_type(Types::EnvironmentType.connection_type) } it { is_expected.to have_graphql_resolver(Resolvers::EnvironmentsResolver) } end + + describe 'boards field' do + subject { described_class.fields['boards'] } + + it { is_expected.to have_graphql_type(Types::BoardType.connection_type) } + end end |