From f96383cbbb6dea5632ad4d5a1312a36035cb25ea Mon Sep 17 00:00:00 2001 From: Akzhan Abdulin Date: Wed, 31 Aug 2011 16:37:28 +0400 Subject: [PATCH] Fix call-remote test when current location have no questionmark --- test/public/test/call-remote.js | 2 ++ 1 file changed, 2 insertions(+) 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