Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add test for proper ampersand encoding

  • Loading branch information...
commit bc9d145058927df7ea6dad8fce311c70c9d7b89e 1 parent 18fd718
Kyle Fleming authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 test/test_client.rb
View
5 test/test_client.rb
@@ -363,6 +363,11 @@ def test_esc
assert_equal "%D1%81%D0%BF%D1%8F%D1%82+%D1%83%D1%81%D1%82%D0%B0%D0%BB%D1%8B%D0%B5+%D0%B8%D0%B3%D1%80%D1%83%D1%88%D0%BA%D0%B8", result
end
+ def test_should_encode_ampersand
+ result = YouTubeIt.esc("such & such")
+ assert_equal "such+%26+such", result
+ end
+
def test_unicode_query
videos = @client.videos_by(:query => 'спят усталые игрушки').videos
assert videos.map(&:unique_id).include?("w-7BT2CFYNU")
Please sign in to comment.
Something went wrong with that request. Please try again.