Created
May 21, 2010 18:34
-
-
Save xetorthio/409231 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
story "As a consumer I want to get details of a user so I can show the user information in my own site", { | |
scenario "Get user information anonymously without filtering", { | |
def facebook = new groovyx.net.http.RESTClient("https://graph.facebook.com/") | |
def response = facebook.get(path:"jleibiusky") | |
assert response.status == 200 | |
assert response.data.name == "Jonathan Leibiusky" | |
assert response.data.first_name == "Jonathan" | |
} | |
scenario "Get user information anonymously filtering by fields", { | |
def facebook = new groovyx.net.http.RESTClient("https://graph.facebook.com/") | |
def response = facebook.get(path:"jleibiusky", query:[fields:"name"]) | |
assert response.status == 200 | |
assert response.data.name == "Jonathan Leibiusky" | |
assert response.data.first_name == null | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment