-
Notifications
You must be signed in to change notification settings - Fork 606
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
Testing with ember-cli #211
Comments
For that purpose, I use the ephemeral store: We also fake authentication for authenticated test by using: var session = App.__container__.lookup('ember-simple-auth-session:main');
session.set('isAuthenticated', true);
session.set('accessToken', 'authenticated'); |
@seriousbenat360pi Thanks for your help on this! I'm curious how I may be able to set |
Good question, to do this I have a check in the initializer app.get('testing')... unfortunately we could not change the simple-auth initializer once its loaded and we could not inject another store either. |
Yes, changing the store after |
I'm trying to find documentation on how to get ember-simple-auth to run fine in our tests. Unfortunately I'm having an issue where if I simulate the login experience, the mechanism for authentication keeps it around in the next test.
For example, If in
test 1
I test the user can view the login page, and thentest 2
is to testa successful login, thentest 3
fails because I test whether you can register, but you are already logged in.Is there something I can do in the qunit teardown to remove the session/token?
The text was updated successfully, but these errors were encountered: