This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/test/javascripts/views/header_view_test.js

15 lines
387 B
JavaScript

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