Skip to content

Commit

Permalink
Updates specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Corsaro committed Sep 6, 2011
1 parent 857c7da commit 53a8ff4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 43 deletions.
4 changes: 2 additions & 2 deletions features/objectify.feature
Expand Up @@ -11,5 +11,5 @@ Feature: Objectify
And objectify api_version is 2 And objectify api_version is 2


Examples: Examples:
| url | metadesc | | url | metadesc |
| http://tweetphoto.com/14784358 | Earn PTZ when you watch | | http://lockerz.com/s/136425091 | Quentin Richardson's Photo on Lockerz.com |
56 changes: 15 additions & 41 deletions features/oembed.feature
Expand Up @@ -5,20 +5,23 @@ Feature: OEmbed
Because I want and oembed for a specific url Because I want and oembed for a specific url


Scenario Outline: Get the provider_url Scenario Outline: Get the provider_url
Given an embedly api Given an embedly api with key
When oembed is called with the <url> URL When oembed is called with the <url> URL
Then the provider_url should be <provider_url> Then the provider_url should be <provider_url>


Examples: Examples:
| url | provider_url | | url | provider_url |
| http://www.scribd.com/doc/13994900/Easter | http://www.scribd.com/ | | http://www.scribd.com/doc/13994900/Easter | http://www.scribd.com/ |
| http://www.scribd.com/doc/28452730/Easter-Cards | http://www.scribd.com/ | | http://www.scribd.com/doc/28452730/Easter-Cards | http://www.scribd.com/ |
| http://www.youtube.com/watch?v=Zk7dDekYej0 | http://www.youtube.com/ | | http://www.youtube.com/watch?v=Zk7dDekYej0 | http://www.youtube.com/ |
| http://yfrog.com/h7qqespj | http://yfrog.com | | http://yfrog.com/h7qqespj | http://yfrog.com |
| http://blog.embed.ly/bob | http://posterous.com |
| http://blog.doki-pen.org/cassandra-rules | http://posterous.com |
| http://www.guardian.co.uk/media/2011/jan/21/andy-coulson-phone-hacking-statement | http://www.guardian.co.uk/ |




Scenario Outline: Get the types Scenario Outline: Get the types
Given an embedly api Given an embedly api with key
When oembed is called with the <url> URL When oembed is called with the <url> URL
Then the type should be <type> Then the type should be <type>


Expand All @@ -31,7 +34,7 @@ Feature: OEmbed




Scenario Outline: Get the provider_url with force flag Scenario Outline: Get the provider_url with force flag
Given an embedly api Given an embedly api with key
When oembed is called with the <url> URL and force flag When oembed is called with the <url> URL and force flag
Then the provider_url should be <provider_url> Then the provider_url should be <provider_url>


Expand All @@ -41,7 +44,7 @@ Feature: OEmbed




Scenario Outline: Get multiple provider_urls Scenario Outline: Get multiple provider_urls
Given an embedly api Given an embedly api with key
When oembed is called with the <urls> URLs When oembed is called with the <urls> URLs
Then provider_url should be <provider_urls> Then provider_url should be <provider_urls>


Expand All @@ -51,20 +54,8 @@ Feature: OEmbed
| http://www.youtube.com/watch?v=Zk7dDekYej0,http://yfrog.com/h7qqespj | http://www.youtube.com/,http://yfrog.com | | http://www.youtube.com/watch?v=Zk7dDekYej0,http://yfrog.com/h7qqespj | http://www.youtube.com/,http://yfrog.com |




Scenario Outline: Get the provider_url with pro
Given an embedly api with key
When oembed is called with the <url> URL
Then the provider_url should be <provider_url>

Examples:
| url | provider_url |
| http://blog.embed.ly/bob | http://posterous.com |
| http://blog.doki-pen.org/cassandra-rules | http://posterous.com |
| http://www.guardian.co.uk/media/2011/jan/21/andy-coulson-phone-hacking-statement | http://www.guardian.co.uk/ |


Scenario Outline: Attempt to get 404 URL Scenario Outline: Attempt to get 404 URL
Given an embedly api Given an embedly api with key
When oembed is called with the <url> URL When oembed is called with the <url> URL
Then type should be error Then type should be error
And error_code should be 404 And error_code should be 404
Expand All @@ -73,34 +64,17 @@ Feature: OEmbed
Examples: Examples:
| url | | url |
| http://www.youtube.com/watch/is/a/bad/url | | http://www.youtube.com/watch/is/a/bad/url |
| http://www.scribd.com/doc/zfldsf/asdfkljlas/klajsdlfkasdf |
| http://fav.me/alsfsdf | | http://fav.me/alsfsdf |




Scenario Outline: Attempt multi get 404 URLs Scenario Outline: Attempt multi get 404 URLs
Given an embedly api Given an embedly api with key
When oembed is called with the <urls> URLs When oembed is called with the <urls> URLs
Then error_code should be <errcode> Then error_code should be <errcode>
And type should be <types> And type should be <types>


Examples: Examples:
| urls | errcode | types | | urls | errcode | types |
| http://www.youtube.com/watch/a/bassd/url,http://www.youtube.com/watch/ldf/asdlfj | 404,404 | error,error | | http://www.youtube.com/watch/a/bassd/url,http://www.youtube.com/watch/ldf/asdlfj | 404,404 | error,error |
| http://www.scribd.com/doc/lsbsdlfldsf/kl,http://www.scribd.com/doc/zasdf/asdfl | 404,404 | error,error |
| http://www.youtube.com/watch/zzzzasdf/kl,http://yfrog.com/h7qqespj | 404, | error,photo | | http://www.youtube.com/watch/zzzzasdf/kl,http://yfrog.com/h7qqespj | 404, | error,photo |
| http://yfrog.com/h7qqespj,http://www.scribd.com/doc/asdfasdfasdf | ,404 | photo,error | | http://yfrog.com/h7qqespj,http://www.youtube.com/watch/asdfasdfasdf | ,404 | photo,error |

Scenario Outline: Attempt at non-api service without key
Given an embedly api
When oembed is called with the <url> URL
Then error_code should be 401
And error_message should be Embedly api key is required.
And type should be error

Examples:
| urls |
| http://hn.embed.ly/ |
| http://bit.ly/enZRxO |
| http://techcrunch.com/2011/02/03/linkedins-next-data-dive-professional-skills/ |
| http://teachertube.com/rssPhoto.php |
| http://goo.gl/y1i9p |

0 comments on commit 53a8ff4

Please sign in to comment.