diff --git a/test/public/test/call-remote.js b/test/public/test/call-remote.js index 0a420b13..3846cce3 100644 --- a/test/public/test/call-remote.js +++ b/test/public/test/call-remote.js @@ -96,9 +96,11 @@ asyncTest('allow empty form "action"', 1, function() { currentLocation.href = ""; currentLocation = currentLocation.href; } + currentLocation = currentLocation.replace(/\?$/, ''); // Actual location (strip out settings.data that jQuery serializes and appends) ajaxLocation = settings.url.replace(settings.data,"").replace(/&$/, ""); + ajaxLocation = ajaxLocation.replace(/\?$/, ''); equal(ajaxLocation.match(/^(.*)/)[1], currentLocation, 'URL should be current page by default'); // Prevent the request from actually getting sent to the current page and