0

Typically, when you invalidate an Ember Simple Auth session, it'll reload the application. This is great for security in production, but while testing, it can be a headache. I'm running my tests using Teaspoon, and any time I logout a test user, Ember Simple Auth reloads the app--essentially terminating the test suite.

Has anyone found a workaround for this?

nullnullnull
  • 8,039
  • 12
  • 55
  • 107

1 Answers1

1

I'd just override the sessionInvalidationSucceeded action of your application route in test mode so it doesn't replace the location.

marcoow
  • 4,062
  • 1
  • 14
  • 21
  • That works. For anyone else looking into this, this method is in the `ApplicationRouteMixin`. This means you can change it with something like: `Ember.SimpleAuth.ApplicationRouteMixin.reopen({ actions: { sessionInvalidationSucceeded: function() {} } });` – nullnullnull Jun 10 '14 at 21:33
  • Or you just change the actual application route. – marcoow Jun 11 '14 at 06:25