DEV: Disable `discourse-presence` in Ember test env.

DEV: Disable discourse-presence in Ember test env.

diff --git a/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6 b/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6
index 9cfb46f..1f8ec4d 100644
--- a/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6
+++ b/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6
@@ -11,11 +11,11 @@ export default Component.extend({
 
   @on("didInsertElement")
   subscribe() {
-    this.get("presenceManager").subscribe();
+    this.presenceManager && this.presenceManager.subscribe();
   },
 
   @on("willDestroyElement")
   _destroyed() {
-    this.get("presenceManager").unsubscribe();
+    this.presenceManager && this.presenceManager.unsubscribe();
   }
 });
diff --git a/plugins/discourse-presence/assets/javascripts/initializers/discourse-presence.js.es6 b/plugins/discourse-presence/assets/javascripts/initializers/discourse-presence.js.es6
index 1b591ce..f1558d0 100644
--- a/plugins/discourse-presence/assets/javascripts/initializers/discourse-presence.js.es6
+++ b/plugins/discourse-presence/assets/javascripts/initializers/discourse-presence.js.es6
@@ -35,7 +35,7 @@ export default {
   initialize(container) {
     const siteSettings = container.lookup("site-settings:main");
 
-    if (siteSettings.presence_enabled) {
+    if (siteSettings.presence_enabled && ENV.environment !== "test") {
       withPluginApi("0.8.40", initializeDiscoursePresence);
     }
   }

GitHub sha: 8b3b5d14