mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 11:33:06 +08:00
17 lines
425 B
JavaScript
17 lines
425 B
JavaScript
module("Discourse.HeaderView");
|
|
|
|
import HeaderView from 'discourse/views/header';
|
|
|
|
test("showNotifications", function() {
|
|
var controllerSpy = {
|
|
send: sinon.spy()
|
|
};
|
|
var view = HeaderView.create({
|
|
controller: controllerSpy
|
|
});
|
|
|
|
view.showNotifications();
|
|
|
|
ok(controllerSpy.send.calledWith("showNotifications", view), "sends showNotifications message to the controller, passing header view as a param");
|
|
});
|