Skip to content

Instantly share code, notes, and snippets.

@anteriovieira
Last active September 25, 2017 12:30
Show Gist options
  • Save anteriovieira/0a6f385a8168be58bb32a15540490d46 to your computer and use it in GitHub Desktop.
Save anteriovieira/0a6f385a8168be58bb32a15540490d46 to your computer and use it in GitHub Desktop.
Postman
var teste_token = false;
if (responseCode.code === 200) {
var jsonData = JSON.parse(responseBody);
postman.setEnvironmentVariable("access_token", jsonData["access_token"]);
teste_token = true;
}
tests["Fetch token success"] = teste_token;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment