diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 06:09:54 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 06:09:54 +0000 |
commit | f6cdec670b9b757fc2225a2c6627ab79765e5b8a (patch) | |
tree | 7a1fde030f117b69332d01b22deefd1c81fff458 /spec/requests/api/graphql/project_query_spec.rb | |
parent | e2ee1eec50aa8df8543d7ecc585ec0ba5ee544ac (diff) | |
download | gitlab-ce-f6cdec670b9b757fc2225a2c6627ab79765e5b8a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api/graphql/project_query_spec.rb')
-rw-r--r-- | spec/requests/api/graphql/project_query_spec.rb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/spec/requests/api/graphql/project_query_spec.rb b/spec/requests/api/graphql/project_query_spec.rb index fbb22958d51..035894c8022 100644 --- a/spec/requests/api/graphql/project_query_spec.rb +++ b/spec/requests/api/graphql/project_query_spec.rb @@ -9,7 +9,27 @@ describe 'getting project information' do let(:current_user) { create(:user) } let(:query) do - graphql_query_for('project', 'fullPath' => project.full_path) + graphql_query_for( + 'project', + { 'fullPath' => project.full_path }, + all_graphql_fields_for('project'.to_s.classify, excluded: %w(jiraImports services)) + ) + end + + context 'when the user has full access to the project' do + let(:full_access_query) do + graphql_query_for('project', 'fullPath' => project.full_path) + end + + before do + project.add_maintainer(current_user) + end + + it 'includes the project' do + post_graphql(query, current_user: current_user) + + expect(graphql_data['project']).not_to be_nil + end end context 'when the user has access to the project' do |