2020-08-11 15:10:08 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
RSpec.describe Types::Ci::JobType do
|
|
|
|
specify { expect(described_class.graphql_name).to eq('CiJob') }
|
2021-05-04 12:10:04 +00:00
|
|
|
specify { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Ci::Job) }
|
2020-08-11 15:10:08 +00:00
|
|
|
|
|
|
|
it 'exposes the expected fields' do
|
|
|
|
expected_fields = %i[
|
2021-04-02 18:09:20 +00:00
|
|
|
active
|
2021-03-23 09:09:17 +00:00
|
|
|
allow_failure
|
|
|
|
artifacts
|
2021-04-02 18:09:20 +00:00
|
|
|
cancelable
|
|
|
|
commitPath
|
|
|
|
coverage
|
2021-03-23 09:09:17 +00:00
|
|
|
created_at
|
2021-04-22 15:09:56 +00:00
|
|
|
created_by_tag
|
2021-03-23 09:09:17 +00:00
|
|
|
detailedStatus
|
|
|
|
duration
|
|
|
|
finished_at
|
2021-03-17 18:09:01 +00:00
|
|
|
id
|
2021-04-22 15:09:56 +00:00
|
|
|
manual_job
|
2020-08-11 15:10:08 +00:00
|
|
|
name
|
|
|
|
needs
|
2021-03-23 09:09:17 +00:00
|
|
|
pipeline
|
2021-04-02 18:09:20 +00:00
|
|
|
playable
|
2021-03-23 09:09:17 +00:00
|
|
|
queued_at
|
2021-04-26 18:09:45 +00:00
|
|
|
queued_duration
|
2021-04-02 18:09:20 +00:00
|
|
|
refName
|
|
|
|
refPath
|
|
|
|
retryable
|
2020-10-14 09:08:46 +00:00
|
|
|
scheduledAt
|
2021-03-31 15:10:27 +00:00
|
|
|
schedulingType
|
2021-03-23 09:09:17 +00:00
|
|
|
shortSha
|
|
|
|
stage
|
|
|
|
started_at
|
|
|
|
status
|
2021-05-12 00:10:27 +00:00
|
|
|
stuck
|
2021-04-05 18:09:15 +00:00
|
|
|
tags
|
2021-04-22 15:09:56 +00:00
|
|
|
triggered
|
2021-05-04 12:10:04 +00:00
|
|
|
userPermissions
|
2020-08-11 15:10:08 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
expect(described_class).to have_graphql_fields(*expected_fields)
|
|
|
|
end
|
|
|
|
end
|