discourse/test/javascripts/views/header_view_test.js

15 lines
385 B
JavaScript
Raw Normal View History

module("Discourse.HeaderView");
test("showNotifications", function() {
var controllerSpy = {
send: sinon.spy()
};
var view = Discourse.HeaderView.create({
controller: controllerSpy
});
view.showNotifications();
ok(controllerSpy.send.calledWith("showNotifications", view), "sends showNotifications message to the controller, passing header view as a param");
});