ES6: Notification controllers, added helper to create via ES6/container
This commit is contained in:
@@ -11,13 +11,10 @@ var notificationFixture = {
|
||||
};
|
||||
var postUrlStub = "post-url-stub";
|
||||
|
||||
module("Discourse.NotificationController", {
|
||||
module("controller:notification", {
|
||||
setup: function() {
|
||||
sinon.stub(Discourse.Utilities, "postUrl").returns(postUrlStub);
|
||||
|
||||
controller = Discourse.NotificationController.create({
|
||||
content: notificationFixture
|
||||
});
|
||||
controller = testController('notification', notificationFixture);
|
||||
},
|
||||
|
||||
teardown: function() {
|
||||
|
||||
@@ -10,16 +10,14 @@ var noItemsMessageSelector = "div.none";
|
||||
var itemListSelector = "ul";
|
||||
var itemSelector = "li";
|
||||
|
||||
module("Discourse.NotificationsController", {
|
||||
module("controller:notifications", {
|
||||
setup: function() {
|
||||
sinon.stub(I18n, "t", function (scope, options) {
|
||||
options = options || {};
|
||||
return [scope, options.username, options.link].join(" ").trim();
|
||||
});
|
||||
|
||||
controller = Discourse.NotificationsController.create({
|
||||
container: Discourse.__container__
|
||||
});
|
||||
controller = testController('notifications');
|
||||
|
||||
view = Ember.View.create({
|
||||
container: Discourse.__container__,
|
||||
|
||||
Reference in New Issue
Block a user