diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 10:53:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 10:53:40 +0300 |
commit | cfc792b9ca064990e6540cb742e80529ea669a81 (patch) | |
tree | 147cd4256319990cebbc02fe8e4fbbbe06f5720a /spec/graphql/types/user_type_spec.rb | |
parent | 93c6764dacd4c605027ef1cd367d3aebe420b223 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/graphql/types/user_type_spec.rb')
-rw-r--r-- | spec/graphql/types/user_type_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/graphql/types/user_type_spec.rb b/spec/graphql/types/user_type_spec.rb index 8134cc13eb4..b9174b9a90b 100644 --- a/spec/graphql/types/user_type_spec.rb +++ b/spec/graphql/types/user_type_spec.rb @@ -6,4 +6,21 @@ describe GitlabSchema.types['User'] do it { expect(described_class.graphql_name).to eq('User') } it { expect(described_class).to require_graphql_authorizations(:read_user) } + + it 'has the expected fields' do + expected_fields = %w[ + user_permissions snippets name username avatarUrl webUrl todos + ] + + is_expected.to have_graphql_fields(*expected_fields) + end + + describe 'snippets field' do + subject { described_class.fields['snippets'] } + + it 'returns snippets' do + is_expected.to have_graphql_type(Types::SnippetType.connection_type) + is_expected.to have_graphql_resolver(Resolvers::Users::SnippetsResolver) + end + end end |