Skip to content

Commit

Permalink
update test to check for new tag pattern as well
Browse files Browse the repository at this point in the history
  • Loading branch information
vasconsaurus committed Jul 20, 2023
1 parent 2d200ca commit dfdc4d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/models/parser/tiktok_item_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ def doc

match_one = Parser::TiktokItem.match?('https://www.tiktok.com/@fakeaccount/video/abcdef?a=1')
assert_equal true, match_one.is_a?(Parser::TiktokItem)

match_one = Parser::TiktokItem.match?('https://www.tiktok.com/tag/randomtag')

Check failure

Code scanning / CodeQL

Incomplete regular expression for hostnames High test

This regular expression has an unescaped '.' before 'tiktok.com/tag/randomtag', so it might match more hosts than expected.
assert_equal true, match_one.is_a?(Parser::TiktokItem)
end

test "should set profile defaults upon error" do
Expand Down

0 comments on commit dfdc4d7

Please sign in to comment.