diff options
Diffstat (limited to 'spec/graphql/types/ci')
-rw-r--r-- | spec/graphql/types/ci/config/job_restriction_type_spec.rb | 13 | ||||
-rw-r--r-- | spec/graphql/types/ci/config/job_type_spec.rb | 9 | ||||
-rw-r--r-- | spec/graphql/types/ci/job_type_spec.rb | 1 |
3 files changed, 23 insertions, 0 deletions
diff --git a/spec/graphql/types/ci/config/job_restriction_type_spec.rb b/spec/graphql/types/ci/config/job_restriction_type_spec.rb new file mode 100644 index 00000000000..dd46a38b7c2 --- /dev/null +++ b/spec/graphql/types/ci/config/job_restriction_type_spec.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Types::Ci::Config::JobRestrictionType do + specify { expect(described_class.graphql_name).to eq('CiConfigJobRestriction') } + + it 'exposes the expected fields' do + expected_fields = %i[refs] + + expect(described_class).to include_graphql_fields(*expected_fields) + end +end diff --git a/spec/graphql/types/ci/config/job_type_spec.rb b/spec/graphql/types/ci/config/job_type_spec.rb index 600d665a84b..de4e167f69c 100644 --- a/spec/graphql/types/ci/config/job_type_spec.rb +++ b/spec/graphql/types/ci/config/job_type_spec.rb @@ -7,10 +7,19 @@ RSpec.describe Types::Ci::Config::JobType do it 'exposes the expected fields' do expected_fields = %i[ + afterScript + allowFailure + beforeScript + environment + except + script name + only group_name stage + tags needs + when ] expect(described_class).to have_graphql_fields(*expected_fields) diff --git a/spec/graphql/types/ci/job_type_spec.rb b/spec/graphql/types/ci/job_type_spec.rb index 441a719df8c..e277916f5cb 100644 --- a/spec/graphql/types/ci/job_type_spec.rb +++ b/spec/graphql/types/ci/job_type_spec.rb @@ -4,6 +4,7 @@ require 'spec_helper' RSpec.describe Types::Ci::JobType do specify { expect(described_class.graphql_name).to eq('CiJob') } + specify { expect(described_class).to require_graphql_authorizations(:read_commit_status) } it 'exposes the expected fields' do expected_fields = %i[ |