Permalink
Browse files

Hack test to make work with jquery 1.6.3 and 1.6.4

  • Loading branch information...
1 parent acd1a14 commit a3345712bef0614ca7d3d3012f07fef8b33a7626 @JangoSteve JangoSteve committed Oct 12, 2011
Showing with 4 additions and 2 deletions.
  1. +3 −1 test/public/test/call-remote.js
  2. +1 −1 test/server.rb
@@ -99,7 +99,9 @@ asyncTest('allow empty form "action"', 1, function() {
currentLocation = currentLocation.replace(/\?$/, '');
// Actual location (strip out settings.data that jQuery serializes and appends)
- ajaxLocation = settings.url.replace(settings.data,"").replace(/&$/, "").replace(/\?$/, "");
+ // HACK: can no longer use settings.data below to see what was appended to URL, as of
+ // jQuery 1.6.3 (see http://bugs.jquery.com/ticket/10202 and https://github.com/jquery/jquery/pull/544)
+ ajaxLocation = settings.url.replace("user_name=john","").replace(/&$/, "").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
View
@@ -48,7 +48,7 @@ def jquery_versions
end
get '/' do
- params[:version] ||= '1.6.2'
+ params[:version] ||= '1.6.4'
params[:cdn] ||= 'jquery'
erb :index
end

0 comments on commit a334571

Please sign in to comment.