Last active
April 26, 2016 08:32
-
-
Save norberttech/360d455ac914d53a2c2d9ce7f031284d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| Feature: Api Facebook Login | |
| In order to allow users to login with facebook | |
| As API client | |
| I need to trade user facebook token for user api token | |
| Background: | |
| Given I set request header "Content-Type" to "application/json" | |
| Scenario: Obtain api token using "http://facebook.com" grant type | |
| Given API client with following parameters exists | |
| | id | 1_12345667890 | | |
| | secret | abcdefghijklmnzoprwxyz | | |
| And user "user@facebook.com" with access token "access_token" exists on Facebook | |
| When I send a GET request on "/oauth/v2/token" with parameters: | |
| | grant_type | http://facebook.com | | |
| | fb_access_token | access_token | | |
| | client_id | 1_12345667890 | | |
| | client_secret | abcdefghijklmnzoprwxyz | | |
| Then the response status code should be 200 | |
| And json response should match: | |
| """ | |
| { | |
| "access_token": @string@, | |
| "expires_in": @integer@, | |
| "token_type": "bearer", | |
| "scope": @null@, | |
| "refresh_token": @string@ | |
| } | |
| """ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment