When I use capybara-webkit to execute my ajax DELETE requests, I am noticing that the data parameters are not being sent to the controller. However, when I run the test suite with selenium, the data parameters do get sent and the test passes. Here is a snippet of my code:
$(document).on 'click', 'a.delete_contact', ->
if confirm "Are you sure you want to delete this contact?"
id = $('a.delete_contact').data('id')
name = $('a.delete_contact').data('name')
$.ajax '/contacts',
type: 'DELETE'
dataType: 'html'
data: {'id' : id}
success: ->
$("li[data-cid='#{id}']").remove()
removeInitial(_.last(name.split(" "))[0])
show_notice("Contact successfully destroyed.", 'notice')
window.contactSelection.pop()
refreshSelectionView()
return false
Do you have any insights on why this could be failing in capybara-webkit?