<commit_before>var controller, view;

var appendView = function() {
  Ember.run(function() {
    view.appendTo(fixture());
  });
};

var noItemsMessageSelector = "div.none";
var itemListSelector = "ul";
var itemSelector = "li";

module("Discourse.NotificationsController", {
  setup: function() {
    sinon.stub(I18n, "t", function (scope, options) {
      options = options || {};
      return [scope, options.username, options.link].join(" ").trim();
    });

    controller = Discourse.NotificationsController.create();

    view = Ember.View.create({
      controller: controller,
      templateName: "notifications"
    });
  },

  teardown: function() {
    I18n.t.restore();
  }
});

test("mixes in HasCurrentUser", function() {
  ok(Discourse.HasCurrentUser.detect(controller));
});

test("by default uses NotificationController as its item controller", function() {
  equal(controller.get("itemController"), "notification");
});
<commit_msg>fixes Ember's deprecation errors in NotificationsController unit tests<commit_after>var controller, view;

var appendView = function() {
  Ember.run(function() {
    view.appendTo(fixture());
  });
};

var noItemsMessageSelector = "div.none";
var itemListSelector = "ul";
var itemSelector = "li";

module("Discourse.NotificationsController", {
  setup: function() {
    sinon.stub(I18n, "t", function (scope, options) {
      options = options || {};
      return [scope, options.username, options.link].join(" ").trim();
    });

    controller = Discourse.NotificationsController.create();

    view = Ember.View.create({
      container: Discourse.__container__,
      controller: controller,
      templateName: "notifications"
    });
  },

  teardown: function() {
    I18n.t.restore();
  }
});

test("mixes in HasCurrentUser", function() {
  ok(Discourse.HasCurrentUser.detect(controller));
});

test("by default uses NotificationController as its item controller", function() {
  equal(controller.get("itemController"), "notification");
});

{'fraction_non_alphanumeric': 0.15607803901950976, 'fraction_numerical': 0.00400200100050025, 'mean_word_length': 4.333333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2141565', 'n_tokens_mistral': 599, 'n_tokens_neox': 586, 'n_words': 127}