Skip to content

Commit

Permalink
Improve the UserAgents::Chrome.random regex.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Aug 4, 2024
1 parent f151878 commit f954f24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/chrome_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
describe ".random" do
it "must return a random Chrome User-Agent string" do
expect(subject.random).to match(
%r{Mozilla/5\.0 \([^\)]+(?:\(\d+\)[^\)]+)?\) AppleWebKit/537\.36 \(KHTML, like Gecko\) Chrome/\d+(\.\d+)* (?:Mobile )?Safari/537\.36\z}
%r{\AMozilla/5\.0 \([^\(\)]+(?:\([^\)]+\)[^\)]+)?\) AppleWebKit/537\.36 \(KHTML, like Gecko\) Chrome/\d+(\.\d+)* (?:Mobile )?Safari/537\.36\z}
)
end

Expand Down

0 comments on commit f954f24

Please sign in to comment.