Lots of work on tests

This commit is contained in:
Robin Ward
2014-07-30 18:56:01 -04:00
parent b6684e7168
commit 6f36d5996d
43 changed files with 248 additions and 311 deletions
+2 -5
View File
@@ -1,13 +1,10 @@
module("Discourse.HeaderView");
moduleFor("view:header");
test("showNotifications", function() {
var controllerSpy = {
send: sinon.spy()
};
var view = viewClassFor('header').create({
controller: controllerSpy
});
var view = this.subject({controller: controllerSpy});
view.showNotifications();
ok(controllerSpy.send.calledWith("showNotifications", view), "sends showNotifications message to the controller, passing header view as a param");