10. describe("Users should be able to", function () {
it("like a message", function () {
var a = 1;
var b = 2;
var c = a + b;
expect(c).toEqual(3);
expect(c).not.toEqual(4);
});
});
18. Test for triggers
it("like a message", function () {
var spy = jasmine.createSpy();
this.view.listenTo(this.model, "change",
spy);
this.view.likeMessage();
expect(spy).toHaveBeenCalled();
});
19. Test user interaction with jasmine-jquery plugin
it("follow a user", function () {
var followBtn = $('.follow-btn');
followBtn.click();
expect(followBtn).toHaveClass("unfollow");
});