blob: a5370487794182e6d38a465db8464857c753ad3f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# frozen_string_literal: true
require 'rubocop_spec_helper'
require_relative '../../../../rubocop/cop/gitlab/deprecate_track_redis_hll_event'
RSpec.describe RuboCop::Cop::Gitlab::DeprecateTrackRedisHLLEvent do
subject(:cop) { described_class.new }
it 'does not flag the use of track_event' do
expect_no_offenses('track_event :show, name: "p_analytics_insights"')
end
it 'flags the use of track_redis_hll_event' do
expect_offense(<<~SOURCE)
track_redis_hll_event :show, name: 'p_analytics_valuestream'
^^^^^^^^^^^^^^^^^^^^^ `track_redis_hll_event` is deprecated[...]
SOURCE
end
end
|