Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/graphql/types/permission_types')
-rw-r--r--spec/graphql/types/permission_types/abuse_report_spec.rb15
-rw-r--r--spec/graphql/types/permission_types/ci/job_spec.rb2
-rw-r--r--spec/graphql/types/permission_types/ci/pipeline_spec.rb13
-rw-r--r--spec/graphql/types/permission_types/package_spec.rb11
4 files changed, 40 insertions, 1 deletions
diff --git a/spec/graphql/types/permission_types/abuse_report_spec.rb b/spec/graphql/types/permission_types/abuse_report_spec.rb
new file mode 100644
index 00000000000..399df137a78
--- /dev/null
+++ b/spec/graphql/types/permission_types/abuse_report_spec.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Types::PermissionTypes::AbuseReport, feature_category: :insider_threat do
+ it do
+ expected_permissions = [
+ :read_abuse_report, :create_note
+ ]
+
+ expected_permissions.each do |permission|
+ expect(described_class).to have_graphql_field(permission)
+ end
+ end
+end
diff --git a/spec/graphql/types/permission_types/ci/job_spec.rb b/spec/graphql/types/permission_types/ci/job_spec.rb
index e4bc5419070..238f086c7ee 100644
--- a/spec/graphql/types/permission_types/ci/job_spec.rb
+++ b/spec/graphql/types/permission_types/ci/job_spec.rb
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe Types::PermissionTypes::Ci::Job do
it 'has expected permission fields' do
expected_permissions = [
- :read_job_artifacts, :read_build, :update_build
+ :read_job_artifacts, :read_build, :update_build, :cancel_build
]
expect(described_class).to have_graphql_fields(expected_permissions).only
diff --git a/spec/graphql/types/permission_types/ci/pipeline_spec.rb b/spec/graphql/types/permission_types/ci/pipeline_spec.rb
new file mode 100644
index 00000000000..6830b659b12
--- /dev/null
+++ b/spec/graphql/types/permission_types/ci/pipeline_spec.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Types::PermissionTypes::Ci::Pipeline, feature_category: :continuous_integration do
+ it 'has expected permission fields' do
+ expected_permissions = [
+ :admin_pipeline, :destroy_pipeline, :update_pipeline, :cancel_pipeline
+ ]
+
+ expect(described_class).to have_graphql_fields(expected_permissions).only
+ end
+end
diff --git a/spec/graphql/types/permission_types/package_spec.rb b/spec/graphql/types/permission_types/package_spec.rb
new file mode 100644
index 00000000000..3de37438234
--- /dev/null
+++ b/spec/graphql/types/permission_types/package_spec.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe GitlabSchema.types['PackagePermissions'], feature_category: :package_registry do
+ it 'has the expected fields' do
+ expected_permissions = [:destroy_package]
+
+ expect(described_class).to have_graphql_fields(expected_permissions).only
+ end
+end