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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-14 03:09:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-14 03:09:30 +0300
commit8957ace3159e5369a700a77614493ed6a8a98f93 (patch)
tree98ff5be0caa30cfebb4e0cd0ae2ceaf21ce92eb4 /spec/lib/gitlab/usage_data_spec.rb
parent232e0a31f1e5d5b3a788dfc3dba8f8d41df36bf9 (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.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb
index 7bc9e1a9a32..fed33c89726 100644
--- a/spec/lib/gitlab/usage_data_spec.rb
+++ b/spec/lib/gitlab/usage_data_spec.rb
@@ -387,29 +387,6 @@ describe Gitlab::UsageData do
expect(described_class.count(relation, fallback: 15, batch: false)).to eq(15)
end
end
-
- describe '#approximate_counts' do
- it 'gets approximate counts for selected models', :aggregate_failures do
- create(:label)
-
- expect(Gitlab::Database::Count).to receive(:approximate_counts)
- .with(described_class::APPROXIMATE_COUNT_MODELS).once.and_call_original
-
- counts = described_class.approximate_counts.values
-
- expect(counts.count).to eq(described_class::APPROXIMATE_COUNT_MODELS.count)
- expect(counts.any? { |count| count < 0 }).to be_falsey
- end
-
- it 'returns default values if counts can not be retrieved', :aggregate_failures do
- described_class::APPROXIMATE_COUNT_MODELS.map do |model|
- model.name.underscore.pluralize.to_sym
- end
-
- expect(Gitlab::Database::Count).to receive(:approximate_counts).and_return({})
- expect(described_class.approximate_counts.values.uniq).to eq([-1])
- end
- end
end
end
end