summaryrefslogtreecommitdiff
path: root/spec/graphql/types/project_type_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/graphql/types/project_type_spec.rb')
-rw-r--r--spec/graphql/types/project_type_spec.rb30
1 files changed, 17 insertions, 13 deletions
diff --git a/spec/graphql/types/project_type_spec.rb b/spec/graphql/types/project_type_spec.rb
index cb5ac2e3cb1..69fbc72bdf5 100644
--- a/spec/graphql/types/project_type_spec.rb
+++ b/spec/graphql/types/project_type_spec.rb
@@ -7,18 +7,22 @@ describe GitlabSchema.types['Project'] do
it { expect(described_class).to require_graphql_authorizations(:read_project) }
- describe 'nested merge request' do
- it { expect(described_class).to have_graphql_field(:merge_requests) }
- it { expect(described_class).to have_graphql_field(:merge_request) }
+ it 'has the expected fields' do
+ expected_fields = %w[
+ user_permissions id full_path path name_with_namespace
+ name description description_html tag_list ssh_url_to_repo
+ http_url_to_repo web_url star_count forks_count
+ created_at last_activity_at archived visibility
+ container_registry_enabled shared_runners_enabled
+ lfs_enabled merge_requests_ff_only_enabled avatar_url
+ issues_enabled merge_requests_enabled wiki_enabled
+ snippets_enabled jobs_enabled public_jobs open_issues_count import_status
+ only_allow_merge_if_pipeline_succeeds request_access_enabled
+ only_allow_merge_if_all_discussions_are_resolved printing_merge_request_link_enabled
+ namespace group statistics repository merge_requests merge_request issues
+ issue pipelines
+ ]
+
+ is_expected.to have_graphql_fields(*expected_fields)
end
-
- describe 'nested issues' do
- it { expect(described_class).to have_graphql_field(:issues) }
- end
-
- it { is_expected.to have_graphql_field(:pipelines) }
-
- it { is_expected.to have_graphql_field(:repository) }
-
- it { is_expected.to have_graphql_field(:statistics) }
end