From 61461db913546d140bba3b082c78dc553d852401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Tue, 24 Mar 2015 17:20:33 +0100 Subject: [PATCH] fix jasmine spec for correct reshare behavior --- spec/javascripts/app/models/post/interacations_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/javascripts/app/models/post/interacations_spec.js b/spec/javascripts/app/models/post/interacations_spec.js index 3e0dd5b5f..c5c4ff83e 100644 --- a/spec/javascripts/app/models/post/interacations_spec.js +++ b/spec/javascripts/app/models/post/interacations_spec.js @@ -42,7 +42,7 @@ describe("app.models.Post.Interactions", function(){ }); describe("reshare", function() { - var ajax_success = { status: 200, responseText: [] }; + var ajax_success = { status: 200, responseText: '{"id": 1}' }; beforeEach(function(){ this.reshare = this.interactions.post.reshare(); @@ -63,7 +63,7 @@ describe("app.models.Post.Interactions", function(){ this.interactions.reshare(); jasmine.Ajax.requests.mostRecent().respondWith(ajax_success); - expect(app.stream.addNow).toHaveBeenCalledWith(this.reshare); + expect(app.stream.addNow).toHaveBeenCalledWith({id: 1}); }); }); });