|
| 1 | +Feature: OEmbed |
| 2 | + |
| 3 | + As an embedly user |
| 4 | + I want to call the the embedly api |
| 5 | + Because I want and oembed for a specific url |
| 6 | + |
| 7 | + Scenario Outline: Get the provider_url |
| 8 | + Given an embedly endpoint |
| 9 | + When oembed is called with the <url> URL |
| 10 | + Then the provider_url should be <provider_url> |
| 11 | + |
| 12 | + Examples: |
| 13 | + | url | provider_url | |
| 14 | + | http://www.scribd.com/doc/13994900/Easter | http://www.scribd.com/ | |
| 15 | + | http://www.scribd.com/doc/28452730/Easter-Cards | http://www.scribd.com/ | |
| 16 | + | http://www.youtube.com/watch?v=Zk7dDekYej0 | http://www.youtube.com/ | |
| 17 | + | http://tweetphoto.com/14784358 | http://plixi.com | |
| 18 | + |
| 19 | + |
| 20 | + Scenario Outline: Get the provider_url with force flag |
| 21 | + Given an embedly endpoint |
| 22 | + When oembed is called with the <url> URL and force flag |
| 23 | + Then the provider_url should be <provider_url> |
| 24 | + |
| 25 | + Examples: |
| 26 | + | url | provider_url | |
| 27 | + | http://www.youtube.com/watch?v=Zk7dDekYej0 | http://www.youtube.com/ | |
| 28 | + |
| 29 | + |
| 30 | + Scenario Outline: Get multiple provider_urls |
| 31 | + Given an embedly endpoint |
| 32 | + When oembed is called with the <urls> URLs |
| 33 | + Then provider_url should be <provider_urls> |
| 34 | + |
| 35 | + Examples: |
| 36 | + | urls | provider_urls | |
| 37 | + | http://www.scribd.com/doc/13994900/Easter,http://www.scribd.com/doc/28452730/Easter-Cards | http://www.scribd.com/,http://www.scribd.com/ | |
| 38 | + | http://www.youtube.com/watch?v=Zk7dDekYej0,http://plixi.com/p/16044847 | http://www.youtube.com/,http://plixi.com | |
| 39 | + |
| 40 | + |
| 41 | + Scenario Outline: Get the provider_url with pro |
| 42 | + Given an embedly endpoint with key |
| 43 | + When oembed is called with the <url> URL |
| 44 | + Then the provider_url should be <provider_url> |
| 45 | + |
| 46 | + Examples: |
| 47 | + | url | provider_url | |
| 48 | + | http://blog.embed.ly/bob | http://posterous.com | |
| 49 | + | http://blog.doki-pen.org/cassandra-rules | http://posterous.com | |
| 50 | + | http://www.guardian.co.uk/media/2011/jan/21/andy-coulson-phone-hacking-statement | http://www.guardian.co.uk/ | |
| 51 | + |
| 52 | + |
| 53 | + Scenario Outline: Attempt to get 404 URL |
| 54 | + Given an embedly endpoint |
| 55 | + When oembed is called with the <url> URL |
| 56 | + Then type should be error |
| 57 | + And error_code should be 404 |
| 58 | + And type should be error |
| 59 | + |
| 60 | + Examples: |
| 61 | + | url | |
| 62 | + | http://www.youtube.com/this/is/a/bad/url | |
| 63 | + | http://blog.embed.ly/lsbsdlfldsf/asdfkljlas/klajsdlfkasdf | |
| 64 | + | http://tweetphoto.com/alsdfldsf/asdfkljlas/klajsdlfkasdf | |
| 65 | + |
| 66 | + |
| 67 | + Scenario Outline: Attempt multi get 404 URLs |
| 68 | + Given an embedly endpoint |
| 69 | + When oembed is called with the <urls> URLs |
| 70 | + Then error_code should be <errcode> |
| 71 | + And type should be <types> |
| 72 | + |
| 73 | + Examples: |
| 74 | + | urls | errcode | types | |
| 75 | + | http://www.youtube.com/this/is/a/bad/url,http://blog.embed.ly/alsd/slsdlf/asdlfj | 404,404 | error,error | |
| 76 | + | http://blog.embed.ly/lsbsdlfldsf/asdf/kl,http://tweetphoto.com/asdf/asdf/asdfl | 404,404 | error,error | |
| 77 | + | http://blog.embed.ly/lsbsdlfldsf/asdf/kl,http://tweetphoto.com/14784358 | 404,None | error,photo | |
| 78 | + | http://tweetphoto.com/14784358,http://www.scribd.com/asdf/asdf/asdfasdf | None,404 | photo,error | |
| 79 | + |
0 commit comments