rubocops/cask/url: Fix test expectations; regexp for starts_with?
This commit is contained in:
parent
4791224acf
commit
4e067565dd
@ -30,7 +30,7 @@ module RuboCop
|
||||
hash_node.each_pair do |key_node, value_node|
|
||||
next unless key_node.source == "verified"
|
||||
next unless value_node.str_type?
|
||||
next unless value_node.source.start_with?("\"https:/", "\"http:/")
|
||||
next unless value_node.source.start_with?(%r{^"https?://})
|
||||
|
||||
add_offense(
|
||||
value_node.source_range,
|
||||
|
||||
@ -38,7 +38,7 @@ describe RuboCop::Cop::Cask::Url do
|
||||
severity: :convention,
|
||||
line: 3,
|
||||
column: 14,
|
||||
source: "verified: \"https://example.com\"",
|
||||
source: "\"https://example.com\"",
|
||||
}]
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user