2020-04-08 06:09:54 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Types::Projects::ServiceType do
|
2020-05-07 06:09:38 +00:00
|
|
|
specify { expect(described_class).to have_graphql_fields(:type, :active) }
|
2020-04-08 06:09:54 +00:00
|
|
|
|
|
|
|
describe ".resolve_type" do
|
|
|
|
it 'resolves the corresponding type for objects' do
|
|
|
|
expect(described_class.resolve_type(build(:jira_service), {})).to eq(Types::Projects::Services::JiraServiceType)
|
|
|
|
expect(described_class.resolve_type(build(:service), {})).to eq(Types::Projects::Services::BaseServiceType)
|
|
|
|
expect(described_class.resolve_type(build(:alerts_service), {})).to eq(Types::Projects::Services::BaseServiceType)
|
|
|
|
expect(described_class.resolve_type(build(:custom_issue_tracker_service), {})).to eq(Types::Projects::Services::BaseServiceType)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|