diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-16 18:06:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-16 18:06:26 +0300 |
commit | 84727c8209a4412e21111a07f99b0438b03232de (patch) | |
tree | 1fcfa02b01548c3cdc561186870a1c807f227f0b /spec/lib/gitlab/usage_data_spec.rb | |
parent | d2798d607e11e0ebae83ae909404834388733428 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/usage_data_spec.rb')
-rw-r--r-- | spec/lib/gitlab/usage_data_spec.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb index 8eb64b97d6a..62787c5abaf 100644 --- a/spec/lib/gitlab/usage_data_spec.rb +++ b/spec/lib/gitlab/usage_data_spec.rb @@ -3,14 +3,16 @@ require 'spec_helper' describe Gitlab::UsageData do - let(:projects) { create_list(:project, 3) } + let(:projects) { create_list(:project, 4) } let!(:board) { create(:board, project: projects[0]) } describe '#data' do before do create(:jira_service, project: projects[0]) - create(:jira_service, project: projects[1]) + create(:jira_service, :without_properties_callback, project: projects[1]) create(:jira_service, :jira_cloud_service, project: projects[2]) + create(:jira_service, :without_properties_callback, project: projects[3], + properties: { url: 'https://mysite.atlassian.net' }) create(:prometheus_service, project: projects[1]) create(:service, project: projects[0], type: 'SlackSlashCommandsService', active: true) create(:service, project: projects[1], type: 'SlackService', active: true) @@ -156,7 +158,7 @@ describe Gitlab::UsageData do count_data = subject[:counts] expect(count_data[:boards]).to eq(1) - expect(count_data[:projects]).to eq(3) + expect(count_data[:projects]).to eq(4) expect(count_data.keys).to include(*expected_keys) expect(expected_keys - count_data.keys).to be_empty end @@ -164,14 +166,14 @@ describe Gitlab::UsageData do it 'gathers projects data correctly' do count_data = subject[:counts] - expect(count_data[:projects]).to eq(3) + expect(count_data[:projects]).to eq(4) expect(count_data[:projects_prometheus_active]).to eq(1) - expect(count_data[:projects_jira_active]).to eq(3) + expect(count_data[:projects_jira_active]).to eq(4) expect(count_data[:projects_jira_server_active]).to eq(2) - expect(count_data[:projects_jira_cloud_active]).to eq(1) + expect(count_data[:projects_jira_cloud_active]).to eq(2) expect(count_data[:projects_slack_notifications_active]).to eq(2) expect(count_data[:projects_slack_slash_active]).to eq(1) - expect(count_data[:projects_with_repositories_enabled]).to eq(2) + expect(count_data[:projects_with_repositories_enabled]).to eq(3) expect(count_data[:projects_with_error_tracking_enabled]).to eq(1) expect(count_data[:clusters_enabled]).to eq(7) |