diff --git a/app/assets/javascripts/app/views/likes_info_view.js b/app/assets/javascripts/app/views/likes_info_view.js index bd8b45ac4..737b82792 100644 --- a/app/assets/javascripts/app/views/likes_info_view.js +++ b/app/assets/javascripts/app/views/likes_info_view.js @@ -9,7 +9,7 @@ app.views.LikesInfo = app.views.Base.extend({ tooltipSelector : ".avatar", initialize : function() { - this.model.interactions.bind('change', this.render, this) + this.model.interactions.bind('change', this.render, this); }, presenter : function() { diff --git a/spec/javascripts/app/views/header_view_spec.js b/spec/javascripts/app/views/header_view_spec.js index 7ed99fe70..8535464ad 100644 --- a/spec/javascripts/app/views/header_view_spec.js +++ b/spec/javascripts/app/views/header_view_spec.js @@ -90,7 +90,7 @@ describe("app.views.Header", function() { describe("blur", function() { it("removes the class 'active' when the user blurs the text field", function() { - input.focus().blur(); + input.trigger('focus').trigger('blur'); expect(input).not.toHaveClass("active"); }); }); diff --git a/spec/javascripts/app/views/stream_post_spec.js b/spec/javascripts/app/views/stream_post_spec.js index dd782ba6a..d6459dfde 100644 --- a/spec/javascripts/app/views/stream_post_spec.js +++ b/spec/javascripts/app/views/stream_post_spec.js @@ -58,13 +58,13 @@ describe("app.views.StreamPost", function(){ context("likes", function(){ it("displays a like count", function(){ - this.statusMessage.set({likes_count : 1}) + this.statusMessage.interactions.set({likes_count : 1}) var view = new this.PostViewClass({model : this.statusMessage}).render(); expect($(view.el).html()).toContain(Diaspora.I18n.t('stream.likes', {count: 1})) }) it("does not display a like count for 'zero'", function(){ - this.statusMessage.set({likes_count : 0}) + this.statusMessage.interactions.set({likes_count : 0}) var view = new this.PostViewClass({model : this.statusMessage}).render(); expect($(view.el).html()).not.toContain("0 Likes")