From ac9b749dd276d5300c9368479b2415765d635e4b Mon Sep 17 00:00:00 2001 From: zinyando Date: Wed, 8 Jun 2016 15:13:23 +0200 Subject: [PATCH] Add guard to check whether tests are running --- app/app/pods/auth/logout/route.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/app/pods/auth/logout/route.js b/app/app/pods/auth/logout/route.js index cb9c72d8..cb5e8ba3 100644 --- a/app/app/pods/auth/logout/route.js +++ b/app/app/pods/auth/logout/route.js @@ -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"; + } } });