aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-04-19 16:34:44 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-04-19 16:34:44 +0000
commit77af61be40256d1e9e238d093bbd1ffb95263c67 (patch)
tree391d30dbf5998f9948db6b686bad1683e977a710 /actionpack
parent6f34400086857bf1ed790e8a46f10be5debe5d53 (diff)
downloadrails-77af61be40256d1e9e238d093bbd1ffb95263c67.tar.gz
rails-77af61be40256d1e9e238d093bbd1ffb95263c67.tar.bz2
rails-77af61be40256d1e9e238d093bbd1ffb95263c67.zip
Added xml_http_request/xhr method for simulating XMLHttpRequest in functional tests #1151 [Sam Stephenson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG10
-rwxr-xr-xactionpack/Rakefile2
-rw-r--r--actionpack/lib/action_controller/test_process.rb6
3 files changed, 15 insertions, 3 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index c263f0700d..ae5750f6d5 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,4 +1,10 @@
-*SVN*
+*1.8.1* (20th April, 2005)
+
+* Added xml_http_request/xhr method for simulating XMLHttpRequest in functional tests #1151 [Sam Stephenson]. Example:
+
+ xhr :post, :index
+
+* Fixed that Ajax.Base.options.asynchronous wasn't being respected in Ajax.Request (thanks Jon Casey)
* Fixed that :get, :post, and the others should take a flash array as the third argument just like process #1144 [rails@cogentdude.com]
@@ -47,7 +53,7 @@
* Fixed that you can now pass an alternative :href option to link_to_function/remote in order to point to somewhere other than # if the javascript fails or is turned off. You can do the same with form_remote_tag by passing in :action. #1113 [Sam Stephenson]
-* Fixed DateHelper to return values on the option tags such that they'll work properly in IE with form_remote_tag #1024 [rscottmace@gmail.com]
+* Fixed DateHelper to return values on the option tags such that they'll work properly in IE with form_remote_tag #1024 [Scott Raymond]
* Fixed FormTagHelper#check_box to respect checked #1049 [DelynnB]
diff --git a/actionpack/Rakefile b/actionpack/Rakefile
index 9a6623527d..4a0674c98f 100755
--- a/actionpack/Rakefile
+++ b/actionpack/Rakefile
@@ -8,7 +8,7 @@ require 'rake/contrib/rubyforgepublisher'
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'actionpack'
-PKG_VERSION = '1.8.0' + PKG_BUILD
+PKG_VERSION = '1.8.1' + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
RELEASE_NAME = "REL #{PKG_VERSION}"
diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb
index f7dc275c2f..3fd86477db 100644
--- a/actionpack/lib/action_controller/test_process.rb
+++ b/actionpack/lib/action_controller/test_process.rb
@@ -265,6 +265,12 @@ module Test
EOV
end
+ def xml_http_request(request_method, action, parameters = nil, session = nil, flash = nil)
+ @request.env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'
+ self.send(request_method, action, parameters, session, flash)
+ end
+ alias xhr :xml_http_request
+
def follow_redirect
if @response.redirected_to[:controller]
raise "Can't follow redirects outside of current controller (#{@response.redirected_to[:controller]})"