summaryrefslogtreecommitdiff
path: root/rubocop
diff options
context:
space:
mode:
authorddavison <ddavison@gitlab.com>2019-07-09 14:44:16 -0700
committerddavison <ddavison@gitlab.com>2019-07-10 16:10:28 -0700
commit015b61b1dc73e2c8d6e6cf04b6b2c7fb896a452f (patch)
tree218b05eb1f0500c01a0b6e7dccd3a2ea433df73b /rubocop
parent98fc3f23db648a16096994ba3b70d461b5b1ccf0 (diff)
downloadgitlab-ce-015b61b1dc73e2c8d6e6cf04b6b2c7fb896a452f.tar.gz
Change element_with_pattern cop to not use quotes
Using quotes within string validations can be messy. Let's use a typical CSS selector for an unquoted attribute Update the cop spec to validate appropriate new message
Diffstat (limited to 'rubocop')
-rw-r--r--rubocop/cop/qa/element_with_pattern.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/rubocop/cop/qa/element_with_pattern.rb b/rubocop/cop/qa/element_with_pattern.rb
index f7debf13151..d48f4725488 100644
--- a/rubocop/cop/qa/element_with_pattern.rb
+++ b/rubocop/cop/qa/element_with_pattern.rb
@@ -30,7 +30,7 @@ module RuboCop
return if args.first.nil?
args.first.each_node(:str) do |arg|
- add_offense(arg, message: MESSAGE % "data-qa-selector=\"#{element_name.value}\"")
+ add_offense(arg, message: MESSAGE % "data-qa-selector=#{element_name.value}")
end
end