blob: 684f0bf17a1f06b2abb2db6cc51289cc72aafa16 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Gitlab::UsageDataMetrics do
describe '.uncached_data' do
subject { described_class.uncached_data }
around do |example|
described_class.instance_variable_set(:@definitions, nil)
example.run
described_class.instance_variable_set(:@definitions, nil)
end
before do
allow(ActiveRecord::Base.connection).to receive(:transaction_open?).and_return(false)
end
context 'whith instrumentation_class' do
it 'includes top level keys' do
expect(subject).to include(:uuid)
expect(subject).to include(:hostname)
end
it 'includes counts keys' do
expect(subject[:counts]).to include(:boards)
end
end
end
end
|