diff options
Diffstat (limited to 'spec/graphql/types/ci')
-rw-r--r-- | spec/graphql/types/ci/group_type_spec.rb | 17 | ||||
-rw-r--r-- | spec/graphql/types/ci/job_type_spec.rb | 16 | ||||
-rw-r--r-- | spec/graphql/types/ci/stage_type_spec.rb | 16 |
3 files changed, 49 insertions, 0 deletions
diff --git a/spec/graphql/types/ci/group_type_spec.rb b/spec/graphql/types/ci/group_type_spec.rb new file mode 100644 index 00000000000..8d547b19af3 --- /dev/null +++ b/spec/graphql/types/ci/group_type_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Types::Ci::GroupType do + specify { expect(described_class.graphql_name).to eq('CiGroup') } + + it 'exposes the expected fields' do + expected_fields = %i[ + name + size + jobs + ] + + expect(described_class).to have_graphql_fields(*expected_fields) + end +end diff --git a/spec/graphql/types/ci/job_type_spec.rb b/spec/graphql/types/ci/job_type_spec.rb new file mode 100644 index 00000000000..faf3a95cf25 --- /dev/null +++ b/spec/graphql/types/ci/job_type_spec.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Types::Ci::JobType do + specify { expect(described_class.graphql_name).to eq('CiJob') } + + it 'exposes the expected fields' do + expected_fields = %i[ + name + needs + ] + + expect(described_class).to have_graphql_fields(*expected_fields) + end +end diff --git a/spec/graphql/types/ci/stage_type_spec.rb b/spec/graphql/types/ci/stage_type_spec.rb new file mode 100644 index 00000000000..0c352ed27aa --- /dev/null +++ b/spec/graphql/types/ci/stage_type_spec.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Types::Ci::StageType do + specify { expect(described_class.graphql_name).to eq('CiStage') } + + it 'exposes the expected fields' do + expected_fields = %i[ + name + groups + ] + + expect(described_class).to have_graphql_fields(*expected_fields) + end +end |