From befcd453a4d8dc3fe1767f25a56e935d6a5dbaac Mon Sep 17 00:00:00 2001 From: Drew Gross Date: Wed, 2 Mar 2016 20:51:35 -0800 Subject: [PATCH] Add test --- spec/ParseUser.spec.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/spec/ParseUser.spec.js b/spec/ParseUser.spec.js index 58c9e8f3..a74644ae 100644 --- a/spec/ParseUser.spec.js +++ b/spec/ParseUser.spec.js @@ -54,7 +54,7 @@ describe('Parse.User testing', () => { success: function(user) { Parse.User.logIn("non_existent_user", "asdf3", expectError(Parse.Error.OBJECT_NOT_FOUND, done)); - }, + }, error: function(err) { console.error(err); fail("Shit should not fail"); @@ -1763,5 +1763,22 @@ describe('Parse.User testing', () => { }); }); + it("session expiresAt correct format", (done) => { + Parse.User.signUp("asdf", "zxcv", null, { + success: function(user) { + request.get({ + url: 'http://localhost:8378/1/classes/_Session', + json: true, + headers: { + 'X-Parse-Application-Id': 'test', + 'X-Parse-Master-Key': 'test', + }, + }, (error, response, body) => { + expect(body.results[0].expiresAt.__type).toEqual('Date'); + done(); + }) + } + }); + }); });