diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-11 01:40:48 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-11 01:40:48 -0500 |
| commit | 1d0bff6384549b05927690e60c8bf708eda834bf (patch) | |
| tree | 54f02c2371a0a8f25f54c451296b5d431f1f1618 | |
| parent | f513061a84becab81db06c37c71a99b986cda633 (diff) | |
add login test
| -rw-r--r-- | StoneIsland/www/js/sdk/auth.js | 2 | ||||
| -rw-r--r-- | test/test/02-login.js | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/StoneIsland/www/js/sdk/auth.js b/StoneIsland/www/js/sdk/auth.js index 53ac310f..3b905ffb 100644 --- a/StoneIsland/www/js/sdk/auth.js +++ b/StoneIsland/www/js/sdk/auth.js @@ -7,7 +7,7 @@ }, */ -var auth = (function(){ +var auth = sdk.auth = (function(){ var auth = {} auth.appname = is_iphone ? "native-iphone-stoneisland/1.0.0" : "native-android-stoneisland/1.0.0" diff --git a/test/test/02-login.js b/test/test/02-login.js index 793a32f8..94113bee 100644 --- a/test/test/02-login.js +++ b/test/test/02-login.js @@ -54,6 +54,16 @@ describe('account', function(){ }) }) + it('works if no token is set on auth', function(done){ + sdk.auth.access_token = "" + sdk.auth.user_id = -1 + promise(sdk.account.login, { data: login_user_data }).then(function(data){ + assert(data.Header.StatusCode == 200) + assert('UserFull' in data) + done() + }) + }) + }) }) |
