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/projects/service_type_enum_spec.rb')
-rw-r--r--spec/graphql/types/projects/service_type_enum_spec.rb55
1 files changed, 55 insertions, 0 deletions
diff --git a/spec/graphql/types/projects/service_type_enum_spec.rb b/spec/graphql/types/projects/service_type_enum_spec.rb
new file mode 100644
index 00000000000..ead69e60f6c
--- /dev/null
+++ b/spec/graphql/types/projects/service_type_enum_spec.rb
@@ -0,0 +1,55 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe GitlabSchema.types['ServiceType'] do
+ it 'exposes all the existing project services' do
+ expect(described_class.values.keys).to include(*core_service_enums)
+ end
+
+ def core_service_enums
+ %w[
+ ASANA_SERVICE
+ ASSEMBLA_SERVICE
+ BAMBOO_SERVICE
+ BUGZILLA_SERVICE
+ BUILDKITE_SERVICE
+ CAMPFIRE_SERVICE
+ CONFLUENCE_SERVICE
+ CUSTOM_ISSUE_TRACKER_SERVICE
+ DATADOG_SERVICE
+ DISCORD_SERVICE
+ DRONE_CI_SERVICE
+ EMAILS_ON_PUSH_SERVICE
+ EWM_SERVICE
+ EXTERNAL_WIKI_SERVICE
+ FLOWDOCK_SERVICE
+ HANGOUTS_CHAT_SERVICE
+ IRKER_SERVICE
+ JENKINS_SERVICE
+ JIRA_SERVICE
+ MATTERMOST_SERVICE
+ MATTERMOST_SLASH_COMMANDS_SERVICE
+ MICROSOFT_TEAMS_SERVICE
+ PACKAGIST_SERVICE
+ PIPELINES_EMAIL_SERVICE
+ PIVOTALTRACKER_SERVICE
+ PROMETHEUS_SERVICE
+ PUSHOVER_SERVICE
+ REDMINE_SERVICE
+ SHIMO_SERVICE
+ SLACK_SERVICE
+ SLACK_SLASH_COMMANDS_SERVICE
+ TEAMCITY_SERVICE
+ UNIFY_CIRCUIT_SERVICE
+ WEBEX_TEAMS_SERVICE
+ YOUTRACK_SERVICE
+ ZENTAO_SERVICE
+ ]
+ end
+
+ it 'coerces values correctly' do
+ integration = build(:jenkins_integration)
+ expect(described_class.coerce_isolated_result(integration.type)).to eq 'JENKINS_SERVICE'
+ end
+end