diff --git a/spec/javascripts/contact-list-spec.js b/spec/javascripts/contact-list-spec.js index a49ac7636..afeb52a6d 100644 --- a/spec/javascripts/contact-list-spec.js +++ b/spec/javascripts/contact-list-spec.js @@ -7,15 +7,13 @@ describe("Contact List", function() { describe("disconnectUser", function() { it("does an ajax call to person delete with the passed in id", function(){ var id = '3'; - spyOn($,'ajax').andCallThrough(); + spyOn($,'ajax'); List.disconnectUser(id); - expect($.ajax).toHaveBeenCalledWith({ - url: "/contacts/" + id, - type: "DELETE", - success: function(){ - $('.contact_list li[data-guid='+id+']').fadeOut(200); - } - }); + expect($.ajax).toHaveBeenCalled(); + var option_hash = $.ajax.mostRecentCall.args[0]; + expect(option_hash.url).toEqual("/contacts/" + id); + expect(option_hash.type).toEqual("DELETE"); + expect(option_hash.success).toBeDefined(); }); }); });