1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-08 06:55:28 +02:00

Add guard to check whether tests are running

This commit is contained in:
zinyando 2016-06-08 15:13:23 +02:00
parent 368bb6850e
commit ac9b749dd2

View file

@ -1,10 +1,15 @@
import Ember from 'ember';
import config from 'documize/config/environment';
export default Ember.Route.extend({
activate: function(){
this.session.logout();
this.audit.record("logged-in");
this.audit.stop();
window.document.location = this.session.appMeta.allowAnonymousAccess ? "/" : "/auth/login";
if (config.environment === 'test') {
this.transitionTo('auth.login');
}else{
window.document.location = this.session.appMeta.allowAnonymousAccess ? "/" : "/auth/login";
}
}
});