diff options
author | Yehuda Katz <wycats@gmail.com> | 2008-12-26 23:16:52 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2008-12-26 23:16:52 -0800 |
commit | 5da3ba12159d2c4fc0680efcf0cad8a31f725122 (patch) | |
tree | 171025033fbebe6d9a16102647bac659a612334b /actionpack/test | |
parent | 9b2da52914720d87d2c6d6d94f7fab6a86a70daf (diff) | |
parent | f4f8923cf0ef5bd31f9e98cecf4603d0c4bde296 (diff) | |
download | rails-5da3ba12159d2c4fc0680efcf0cad8a31f725122.tar.gz rails-5da3ba12159d2c4fc0680efcf0cad8a31f725122.tar.bz2 rails-5da3ba12159d2c4fc0680efcf0cad8a31f725122.zip |
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/assert_select_test.rb | 8 | ||||
-rw-r--r-- | actionpack/test/controller/session/cookie_store_test.rb | 9 |
2 files changed, 12 insertions, 5 deletions
diff --git a/actionpack/test/controller/assert_select_test.rb b/actionpack/test/controller/assert_select_test.rb index ed8c4427c9..99c57c0c91 100644 --- a/actionpack/test/controller/assert_select_test.rb +++ b/actionpack/test/controller/assert_select_test.rb @@ -248,6 +248,14 @@ class AssertSelectTest < ActionController::TestCase end end + def test_assert_select_rjs_for_positioned_insert_should_fail_when_mixing_arguments + render_rjs do |page| + page.insert_html :top, "test1", "<div id=\"1\">foo</div>" + page.insert_html :bottom, "test2", "<div id=\"2\">foo</div>" + end + assert_raises(Assertion) {assert_select_rjs :insert, :top, "test2"} + end + # # Test css_select. # diff --git a/actionpack/test/controller/session/cookie_store_test.rb b/actionpack/test/controller/session/cookie_store_test.rb index 69aec59dc0..d349c18d1d 100644 --- a/actionpack/test/controller/session/cookie_store_test.rb +++ b/actionpack/test/controller/session/cookie_store_test.rb @@ -25,7 +25,7 @@ class CookieStoreTest < ActionController::IntegrationTest def set_session_value session[:foo] = "bar" - render :text => Marshal.dump(session.to_hash) + render :text => Verifier.generate(session.to_hash) end def get_session_value @@ -94,8 +94,7 @@ class CookieStoreTest < ActionController::IntegrationTest with_test_route_set do get '/set_session_value' assert_response :success - session_payload = Verifier.generate(Marshal.load(response.body)) - assert_equal ["_myapp_session=#{session_payload}; path=/"], + assert_equal ["_myapp_session=#{response.body}; path=/"], headers['Set-Cookie'] end end @@ -148,8 +147,8 @@ class CookieStoreTest < ActionController::IntegrationTest with_test_route_set do get '/set_session_value' assert_response :success - session_payload = Verifier.generate(Marshal.load(response.body)) - assert_equal ["_myapp_session=#{session_payload}; path=/"], + session_payload = response.body + assert_equal ["_myapp_session=#{response.body}; path=/"], headers['Set-Cookie'] get '/call_reset_session' |