fix jasmine specs
This commit is contained in:
parent
a42c1225d1
commit
cd8deca4bb
1 changed files with 6 additions and 8 deletions
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue