mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 10:34:40 +08:00
refactors header notifications (renders them via separate controller / template)
This commit is contained in:
14
test/javascripts/views/header_view_test.js
Normal file
14
test/javascripts/views/header_view_test.js
Normal 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");
|
||||
});
|
Reference in New Issue
Block a user