diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories/services.rb | 11 | ||||
-rw-r--r-- | spec/lib/gitlab/usage_data_spec.rb | 7 |
2 files changed, 17 insertions, 1 deletions
diff --git a/spec/factories/services.rb b/spec/factories/services.rb index 0d4fd49bf3a..5be56a49903 100644 --- a/spec/factories/services.rb +++ b/spec/factories/services.rb @@ -46,6 +46,17 @@ FactoryBot.define do ) end + factory :jira_cloud_service, class: JiraService do + project + active true + properties( + url: 'https://mysite.atlassian.net', + username: 'jira_user', + password: 'my-secret-password', + project_key: 'jira-key' + ) + end + factory :hipchat_service do project type 'HipchatService' diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb index 76dec4a44fd..b212d2b05f2 100644 --- a/spec/lib/gitlab/usage_data_spec.rb +++ b/spec/lib/gitlab/usage_data_spec.rb @@ -8,6 +8,7 @@ describe Gitlab::UsageData do before do create(:jira_service, project: projects[0]) create(:jira_service, project: projects[1]) + create(:jira_cloud_service, project: projects[2]) create(:prometheus_service, project: projects[1]) create(:service, project: projects[0], type: 'SlackSlashCommandsService', active: true) create(:service, project: projects[1], type: 'SlackService', active: true) @@ -97,6 +98,8 @@ describe Gitlab::UsageData do projects projects_imported_from_github projects_jira_active + projects_jira_server_active + projects_jira_cloud_active projects_slack_notifications_active projects_slack_slash_active projects_prometheus_active @@ -116,7 +119,9 @@ describe Gitlab::UsageData do expect(count_data[:projects]).to eq(3) expect(count_data[:projects_prometheus_active]).to eq(1) - expect(count_data[:projects_jira_active]).to eq(2) + expect(count_data[:projects_jira_active]).to eq(3) + expect(count_data[:projects_jira_server_active]).to eq(2) + expect(count_data[:projects_jira_cloud_active]).to eq(1) expect(count_data[:projects_slack_notifications_active]).to eq(2) expect(count_data[:projects_slack_slash_active]).to eq(1) |