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:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-02-21 15:13:56 +0300
committerTiago Botelho <tiagonbotelho@hotmail.com>2018-03-01 19:43:26 +0300
commit522f4b2c6a0a1fe1e93d7bc2f9fe5290fccba4f9 (patch)
tree3ab5d0d19952c97c19a713df29d0c2de0feb010e /spec/lib/gitlab/database
parent335ee79a73fafdf00fac6e8ffc286ce4bad273ff (diff)
Adapt cycle analytics spec helper and cycle analytics usage data spec
Diffstat (limited to 'spec/lib/gitlab/database')
-rw-r--r--spec/lib/gitlab/database/median_spec.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/spec/lib/gitlab/database/median_spec.rb b/spec/lib/gitlab/database/median_spec.rb
index 36718a1f47b..1b5e30089ce 100644
--- a/spec/lib/gitlab/database/median_spec.rb
+++ b/spec/lib/gitlab/database/median_spec.rb
@@ -1,15 +1,17 @@
require 'spec_helper'
describe Gitlab::Database::Median do
- describe '#extract_medians' do
- context 'when using MySQL' do
- it 'returns an empty hash' do
- values = [["1", "1000"]]
+ let(:dummy_class) do
+ Class.new do
+ include Gitlab::Database::Median
+ end
+ end
- allow(Gitlab::Database).to receive(:mysql?).and_return(true)
+ subject(:median) { dummy_class.new }
- expect(described_class.new.extract_median(values)).eq({})
- end
+ describe '#median_datetimes' do
+ it 'raises NotSupportedError', :mysql do
+ expect { median.median_datetimes(nil, nil, nil, :project_id) }.to raise_error(dummy_class::NotSupportedError, "partition_column is not supported for MySQL")
end
end
end