refactors header notifications (renders them via separate controller / template)

This commit is contained in:
Wojciech Zawistowski
2013-11-08 21:06:27 +01:00
parent 965a0a91a2
commit 67a1da7af4
14 changed files with 244 additions and 75 deletions

View File

@ -0,0 +1,14 @@
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");
});