Remove duplicate mixing in of Discourse.Presence

AdminEmailIndexController and AdminEmailPreviewDigestController explicitely mix in Discourse.Presence, but they extend base classes Discourse.Controller and Discourse.ObjectController that already mix in Discourse.Presence, so this explicit inclusion is redundant.
This commit is contained in:
Wojciech Zawistowski 2013-09-18 18:40:57 +02:00
parent aca567b4d7
commit 7da10c0149
4 changed files with 12 additions and 2 deletions

View File

@ -6,7 +6,7 @@
@namespace Discourse
@module Discourse
**/
Discourse.AdminEmailIndexController = Discourse.Controller.extend(Discourse.Presence, {
Discourse.AdminEmailIndexController = Discourse.Controller.extend({
/**
Is the "send test email" button disabled?

View File

@ -6,7 +6,7 @@
@namespace Discourse
@module Discourse
**/
Discourse.AdminEmailPreviewDigestController = Discourse.ObjectController.extend(Discourse.Presence, {
Discourse.AdminEmailPreviewDigestController = Discourse.ObjectController.extend({
refresh: function() {
var model = this.get('model');

View File

@ -0,0 +1,5 @@
module("Discourse.AdminEmailIndexController");
test("mixes in Discourse.Presence", function() {
ok(Discourse.Presence.detect(Discourse.AdminEmailIndexController.create()));
});

View File

@ -0,0 +1,5 @@
module("Discourse.AdminEmailPreviewDigestController");
test("mixes in Discourse.Presence", function() {
ok(Discourse.Presence.detect(Discourse.AdminEmailPreviewDigestController.create()));
});