diff options
author | Brett Walker <bwalker@gitlab.com> | 2019-04-17 18:43:19 -0500 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2019-04-23 11:16:05 -0500 |
commit | f5c7c3b9ae8b91662830f46b595ce1512050be89 (patch) | |
tree | 7f5ce3d0de713eb637b83a7d94281ea1c101211e /spec/graphql | |
parent | 951ffd9ddeeb6154a5929849f9b2f4c92c24c2a4 (diff) | |
download | gitlab-ce-f5c7c3b9ae8b91662830f46b595ce1512050be89.tar.gz |
Basic GraphQL for a group
Add new query for Groups, with new
GroupType and NamespaceType
Diffstat (limited to 'spec/graphql')
-rw-r--r-- | spec/graphql/types/group_type_spec.rb | 11 | ||||
-rw-r--r-- | spec/graphql/types/namespace_type.rb | 7 | ||||
-rw-r--r-- | spec/graphql/types/query_type_spec.rb | 2 |
3 files changed, 19 insertions, 1 deletions
diff --git a/spec/graphql/types/group_type_spec.rb b/spec/graphql/types/group_type_spec.rb new file mode 100644 index 00000000000..3dd5b602aa2 --- /dev/null +++ b/spec/graphql/types/group_type_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe GitlabSchema.types['Group'] do + it { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Group) } + + it { expect(described_class.graphql_name).to eq('Group') } + + it { expect(described_class).to require_graphql_authorizations(:read_group) } +end diff --git a/spec/graphql/types/namespace_type.rb b/spec/graphql/types/namespace_type.rb new file mode 100644 index 00000000000..7cd6a79ae5d --- /dev/null +++ b/spec/graphql/types/namespace_type.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe GitlabSchema.types['Namespace'] do + it { expect(described_class.graphql_name).to eq('Namespace') } +end diff --git a/spec/graphql/types/query_type_spec.rb b/spec/graphql/types/query_type_spec.rb index 69e3ea8a4a9..b4626955816 100644 --- a/spec/graphql/types/query_type_spec.rb +++ b/spec/graphql/types/query_type_spec.rb @@ -5,7 +5,7 @@ describe GitlabSchema.types['Query'] do expect(described_class.graphql_name).to eq('Query') end - it { is_expected.to have_graphql_fields(:project, :echo, :metadata) } + it { is_expected.to have_graphql_fields(:project, :group, :echo, :metadata) } describe 'project field' do subject { described_class.fields['project'] } |