Skip to content

Instantly share code, notes, and snippets.

@vlucas
Created April 9, 2012 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vlucas/2345479 to your computer and use it in GitHub Desktop.
Save vlucas/2345479 to your computer and use it in GitHub Desktop.
frisby.create('Ensure each tweet has base attributes')
.get('https://api.twitter.com/1/statuses/user_timeline.json?screen_name=brightbit')
.expectStatus(200)
.expectHeaderContains('content-type', 'application/json')
.expectJSONTypes('*', {
id_str: String,
retweeted: Boolean,
in_reply_to_screen_name: function(val) { expect(val).toBeTypeOrNull(String); }, // Custom matcher callback
user: {
verified: Boolean,
location: String,
url: String
}
})
.toss();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment