Skip to content

Commit

Permalink
Merge pull request #19 from PlayFab/IncApiVersion151026
Browse files Browse the repository at this point in the history
Inc api version151026
  • Loading branch information
Paul Gilmore committed Oct 26, 2015
2 parents 7ddf18c + 20bc4b7 commit d237de6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions PlayFabSdk/PlayFab.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var url = require('url');
var https = require('https');

exports.sdk_version = "0.1.151019";
exports.api_version = "1.7.20151019";
exports.sdk_version = "0.2.151026";
exports.api_version = "1.8.20151026";

exports.settings = {
useDevEnv: false,
Expand Down
4 changes: 2 additions & 2 deletions PlayFabTesting/PlayFab.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var url = require('url');
var https = require('https');

exports.sdk_version = "0.1.151019";
exports.api_version = "1.7.20151019";
exports.sdk_version = "0.2.151026";
exports.api_version = "1.8.20151026";

exports.settings = {
useDevEnv: false,
Expand Down
11 changes: 5 additions & 6 deletions PlayFabTesting/PlayFabApiTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ exports.PlayFabApiTests = {
var actualTimeStamp = new Date(result.data.Data[testConstants.TEST_KEY].LastUpdated);

test.equal(testData.testNumber, actualtestNumber, "" + testData.testNumber + "!=" + actualtestNumber);
test.ok(actualTimeStamp > testData.testTimeStamp, "Timestamp did not increase when incrementing: " + actualTimeStamp + " !> " + testData.testTimestamp);
test.ok(actualTimeStamp > testData.testTimeStamp, "Timestamp did not increase when incrementing: " + actualTimeStamp + " !> " + testData.testTimeStamp);
test.done();
};

Expand Down Expand Up @@ -230,7 +230,7 @@ exports.PlayFabApiTests = {
};

var OptionalGetCharsCallback = function (error, result) {
// First login falls back upon registration if login failed
// First get chars falls back upon grant-char if target character not present
if (result == null) {
// Register the character and try again
PlayFabServer.GrantCharacterToUser(grantCharRequest, CallbackWrapper(GrantCharCallback, test));
Expand All @@ -241,18 +241,17 @@ exports.PlayFabApiTests = {
}
};
var GrantCharCallback = function (error, result) {
// Second login MUST succeed
// Second character callback MUST succeed
test.ok(error == null, "GrantCharacter failed");
test.ok(result != null, "GrantCharacter failed");

// Log in again, this time with the newly registered account
PlayFabClient.LoginWithEmailAddress(getCharsRequest, CallbackWrapper(MandatoryGetCharsCallback, test));
// Get chars again, this time with the newly granted character
PlayFabClient.GetAllUsersCharacters(getCharsRequest, CallbackWrapper(MandatoryGetCharsCallback, test));
};
var MandatoryGetCharsCallback = function (error, result) {
// GetChars MUST succeed at some point during this test
test.ok(error == null, "GetChars failed");
test.ok(result != null, "GetChars failed");
test.ok(PlayFab.settings.sessionTicket != null, "Login credentials not saved correctly");

for (var i in result.data.Characters)
if (result.data.Characters[i].CharacterName == titleData.characterName)
Expand Down

0 comments on commit d237de6

Please sign in to comment.