2018-02-15 08:23:39 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Gitlab::Database::Median do
|
2018-02-21 07:13:56 -05:00
|
|
|
let(:dummy_class) do
|
|
|
|
Class.new do
|
|
|
|
include Gitlab::Database::Median
|
|
|
|
end
|
|
|
|
end
|
2018-02-15 08:23:39 -05:00
|
|
|
|
2018-02-21 07:13:56 -05:00
|
|
|
subject(:median) { dummy_class.new }
|
2018-02-15 08:23:39 -05:00
|
|
|
|
2018-02-21 07:13:56 -05:00
|
|
|
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")
|
2018-02-15 08:23:39 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|