diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-04-30 17:51:33 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-04-30 17:51:33 +0300 |
commit | 191152104399cad8b01d06712501250688fca9d7 (patch) | |
tree | 7d18903eb89e502a78ff482a034208e2a860d467 /spec/graphql | |
parent | a96e96d5c8829348fed969d00395be93290577d4 (diff) | |
parent | ff2727fc7efa92228b022ea46bace698caceced1 (diff) |
Merge branch 'bw-add-graphql-groups' into 'master'
Add basic GraphQL for a Group
Closes #60786
See merge request gitlab-org/gitlab-ce!27492
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'] } |