Skip to content

Commit

Permalink
Merge pull request brandly#57 from brandly/more-urls
Browse files Browse the repository at this point in the history
question about getIdFromURL method
  • Loading branch information
brandly committed Jun 8, 2015
2 parents 7c52ee6 + a561f9b commit b007698
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/unit/get-id-from-url.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ describe 'getIdFromURL', ->
url = 'https://www.youtube.com/watch?v=VbNF9X1waSc&feature=youtu.be'
id = 'VbNF9X1waSc'
expect(getIdFromURL(url)).toBe id

it 'should handle http://youtu.be', ->
url = 'https://youtu.be/3FY4MRdQOdE'
id = '3FY4MRdQOdE'
expect(getIdFromURL(url)).toBe id

it 'should handle "edit" links from video manager page', ->
url = 'https://www.youtube.com/edit?o=U&video_id=3k2ZBu3kuiE'
id = '3k2ZBu3kuiE'
expect(getIdFromURL(url)).toBe id

0 comments on commit b007698

Please sign in to comment.