Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication stubbing on tests #118

Closed
oliverbarnes opened this issue Aug 27, 2015 · 2 comments
Closed

Authentication stubbing on tests #118

oliverbarnes opened this issue Aug 27, 2015 · 2 comments
Labels

Comments

@oliverbarnes
Copy link
Owner

Not sure this is the best way:

(example from creating-a-proposal-test.js)

AuthorizationMixin.reopen({
  authorizationCredential: 'Bearer access_token'
});

let session = currentSession();
session.set('isAuthenticated', true);
session.set('secure.access_token', 'access_token');

AuthorizationMixin is needed to get ember-simple-auth working with ember-jsonapi-resources. And ESA's own AuthenticateSession() doesn't seem to work on its own, at least not with 0.8.0

@oliverbarnes
Copy link
Owner Author

emberjax (showcase app for testing good practices) has a startAppAuthorized() helper

@oliverbarnes
Copy link
Owner Author

closing now that we're going with full-stack testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant