Commit 135ef018 authored by Rémy Coutable's avatar Rémy Coutable

Detect feature flags with the 'deduplicate' worker method as well

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent fbb64c30
......@@ -24,6 +24,7 @@ module RuboCop
].freeze
WORKER_METHODS = %i[
data_consistency
deduplicate
].freeze
GRAPHQL_METHODS = %i[
field
......
......@@ -203,6 +203,11 @@ RSpec.describe RuboCop::Cop::Gitlab::MarkUsedFeatureFlags do
include_examples 'does not set any flags as used', 'data_consistency :delayed'
end
describe 'Worker `deduplicate` method' do
include_examples 'sets flag as used', 'deduplicate :delayed, feature_flag: :foo', 'foo'
include_examples 'does not set any flags as used', 'deduplicate :delayed'
end
describe 'GraphQL `field` method' do
before do
allow(cop).to receive(:in_graphql_types?).and_return(true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment