discourse/test/javascripts/views/header_view_test.js

17 lines
425 B
JavaScript
Raw Normal View History

module("Discourse.HeaderView");
2014-06-09 11:34:38 -04:00
import HeaderView from 'discourse/views/header';
test("showNotifications", function() {
var controllerSpy = {
send: sinon.spy()
};
2014-06-09 11:34:38 -04:00
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");
});