From 0be181bfa03f8340fa4945f891409c25a804de7f Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 15 Nov 2010 13:37:05 -0800 Subject: make sure we are only doing sanity checking against regular expressions --- actionpack/test/controller/action_pack_assertions_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index 5a210aa9ec..22ccd2e6b3 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -171,6 +171,14 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase end end + def test_string_constraint + with_routing do |set| + set.draw do |map| + match "photos", :to => 'action_pack_assertions#nothing', :constraints => {:subdomain => "admin"} + end + end + end + def test_assert_redirect_to_named_route_failure with_routing do |set| set.draw do -- cgit v1.2.3 From 7a38c8b9f5b8e36d56f7f8fa9cbbfa931c0ab26f Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Mon, 15 Nov 2010 15:41:47 +0100 Subject: removed an assert from a test as it was testing a private method --- actionpack/test/template/asset_tag_helper_test.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'actionpack/test') diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index caf1c694c8..7c54539cf4 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -306,7 +306,6 @@ class AssetTagHelperTest < ActionView::TestCase ENV["RAILS_ASSET_ID"] = "" assert stylesheet_link_tag('dir/file').html_safe? assert stylesheet_link_tag('dir/other/file', 'dir/file2').html_safe? - assert stylesheet_tag('dir/file', {}).html_safe? end def test_custom_stylesheet_expansions -- cgit v1.2.3 From 6a609dbc82d03eb92a85970aa157192657f14882 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Mon, 15 Nov 2010 16:57:20 +0100 Subject: =?UTF-8?q?incorporated=20most=20of=20the=20feedback=20from=20Jos?= =?UTF-8?q?=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- actionpack/test/template/asset_tag_helper_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index 7c54539cf4..139d832c5f 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -274,7 +274,7 @@ class AssetTagHelperTest < ActionView::TestCase end def test_reset_javascript_expansions - ActionView::Helpers::AssetTagHelper.javascript_expansions.clear + JavascriptIncludeTag.expansions.clear assert_raise(ArgumentError) { javascript_include_tag(:defaults) } end @@ -948,7 +948,7 @@ class AssetTagHelperNonVhostTest < ActionView::TestCase @request = Struct.new(:protocol).new("gopher://") @controller.request = @request - ActionView::Helpers::AssetTagHelper.javascript_expansions.clear + JavascriptIncludeTag.expansions.clear end def url_for(options) -- cgit v1.2.3 From e1e780a31d56f3bf22f13afd92b7e1274bd4b531 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Tue, 16 Nov 2010 18:49:08 +0800 Subject: Brought the domain method in AD http url inline with subdomain where @@tld_length is used by default. Also set the default value of @@tld_length to 1. --- actionpack/test/dispatch/request_test.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 04709e5346..4764a8c2a8 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -96,6 +96,9 @@ class RequestTest < ActiveSupport::TestCase request = stub_request 'HTTP_HOST' => "www.rubyonrails.co.uk" assert_equal "rubyonrails.co.uk", request.domain(2) + request = stub_request 'HTTP_HOST' => "www.rubyonrails.co.uk", :tld_length => 2 + assert_equal "rubyonrails.co.uk", request.domain + request = stub_request 'HTTP_HOST' => "192.168.1.200" assert_nil request.domain -- cgit v1.2.3 From 401c1835afb5af1a6f429061ac8484227c34909d Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Tue, 16 Nov 2010 21:46:15 -0800 Subject: Anchors should be allowed on constraints that are not on path segments --- actionpack/test/controller/routing_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index ecfa13d4ba..ce5c899a19 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -834,6 +834,14 @@ class RouteSetTest < ActiveSupport::TestCase assert_equal({:controller => 'pages', :action => 'show', :id => '10'}, set.recognize_path('/page/10')) end + def test_route_constraints_on_request_object_with_anchors_are_valid + assert_nothing_raised do + set.draw do + match 'page/:id' => 'pages#show', :constraints => { :host => /^foo$/ } + end + end + end + def test_route_constraints_with_anchor_chars_are_invalid assert_raise ArgumentError do set.draw do -- cgit v1.2.3 From fe2f168d40385a0412f41c1a2a44a5536cada8df Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Wed, 17 Nov 2010 16:36:51 -0500 Subject: fix warning during test execution [#5997 state:resolved] Signed-off-by: Santiago Pastorino --- actionpack/test/controller/action_pack_assertions_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index 22ccd2e6b3..7f3d943bba 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -173,7 +173,7 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase def test_string_constraint with_routing do |set| - set.draw do |map| + set.draw do match "photos", :to => 'action_pack_assertions#nothing', :constraints => {:subdomain => "admin"} end end -- cgit v1.2.3 From f14c2bf58204f488cbe589e077a124865ea595f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 17 Nov 2010 23:50:45 +0100 Subject: Pass the view object as parameter to the handler. Useful if you need to access the lookup context or other information when compiling the template. --- actionpack/test/template/render_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb index d2bf45a63a..8087429d62 100644 --- a/actionpack/test/template/render_test.rb +++ b/actionpack/test/template/render_test.rb @@ -221,6 +221,15 @@ module RenderTestCases "@output_buffer << 'source: #{template.source.inspect}'\n" end + WithViewHandler = lambda do |template, view| + %'"#{template.class} #{view.class}"' + end + + def test_render_inline_with_template_handler_with_view + ActionView::Template.register_template_handler :with_view, WithViewHandler + assert_equal 'ActionView::Template ActionView::Base', @view.render(:inline => "Hello, World!", :type => :with_view) + end + def test_render_inline_with_compilable_custom_type ActionView::Template.register_template_handler :foo, CustomHandler assert_equal 'source: "Hello, World!"', @view.render(:inline => "Hello, World!", :type => :foo) -- cgit v1.2.3 From c52e2cf4b3ef22fea6989df906a53188e632b9a4 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 18 Nov 2010 10:10:18 -0800 Subject: delegating path and open to internal tempfile --- actionpack/test/dispatch/uploaded_file_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/dispatch/uploaded_file_test.rb b/actionpack/test/dispatch/uploaded_file_test.rb index b51697b930..e2a7f1bad7 100644 --- a/actionpack/test/dispatch/uploaded_file_test.rb +++ b/actionpack/test/dispatch/uploaded_file_test.rb @@ -28,6 +28,18 @@ module ActionDispatch assert_equal 'foo', uf.tempfile end + def test_delegates_path_to_tempfile + tf = Class.new { def path; 'thunderhorse' end } + uf = Http::UploadedFile.new(:tempfile => tf.new) + assert_equal 'thunderhorse', uf.path + end + + def test_delegates_open_to_tempfile + tf = Class.new { def open; 'thunderhorse' end } + uf = Http::UploadedFile.new(:tempfile => tf.new) + assert_equal 'thunderhorse', uf.open + end + def test_delegates_to_tempfile tf = Class.new { def read; 'thunderhorse' end } uf = Http::UploadedFile.new(:tempfile => tf.new) -- cgit v1.2.3 From be797750e6ce866ea08307f63bf35304a965c8d4 Mon Sep 17 00:00:00 2001 From: Leonardo Capillera Date: Thu, 18 Nov 2010 16:31:27 -0200 Subject: Remove deprecated form_for with strings or symbols Signed-off-by: Santiago Pastorino --- actionpack/test/template/erb/form_for_test.rb | 3 ++- actionpack/test/template/erb/helper.rb | 4 +++- actionpack/test/template/form_helper_test.rb | 33 --------------------------- 3 files changed, 5 insertions(+), 35 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/template/erb/form_for_test.rb b/actionpack/test/template/erb/form_for_test.rb index e722b40a9a..02f07496e0 100644 --- a/actionpack/test/template/erb/form_for_test.rb +++ b/actionpack/test/template/erb/form_for_test.rb @@ -1,10 +1,11 @@ require "abstract_unit" require "template/erb/helper" +require "controller/fake_models" module ERBTest class TagHelperTest < BlockTestCase test "form_for works" do - output = render_content "form_for(:staticpage, :url => {:controller => 'blah', :action => 'update'})", "" + output = render_content "form_for(Post.new, :url => {:controller => 'blah', :action => 'update'})", "" assert_match %r{.*}, output end end diff --git a/actionpack/test/template/erb/helper.rb b/actionpack/test/template/erb/helper.rb index 799f9e4036..fb9d0315f3 100644 --- a/actionpack/test/template/erb/helper.rb +++ b/actionpack/test/template/erb/helper.rb @@ -4,6 +4,8 @@ module ERBTest include ActionView::Helpers::TagHelper include ActionView::Helpers::JavaScriptHelper include ActionView::Helpers::FormHelper + include ActionView::Context + include ActionController::RecordIdentifier attr_accessor :output_buffer, :controller @@ -20,4 +22,4 @@ module ERBTest "<%= #{str} do %>#{rest}<% end %>" end end -end \ No newline at end of file +end diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 2c60096475..7179ae4e9c 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -781,23 +781,6 @@ class FormHelperTest < ActionView::TestCase assert_dom_equal expected, output_buffer end - def test_form_for_without_object - form_for(:post, :html => { :id => 'create-post' }) do |f| - concat f.text_field(:title) - concat f.text_area(:body) - concat f.check_box(:secret) - end - - expected = whole_form("/", "create-post") do - "" + - "" + - "" + - "" - end - - assert_dom_equal expected, output_buffer - end - def test_form_for_with_index form_for(@post, :as => "post[]") do |f| concat f.label(:title) @@ -867,22 +850,6 @@ class FormHelperTest < ActionView::TestCase I18n.locale = old_locale end - def test_submit_without_object_and_locale_strings - old_locale, I18n.locale = I18n.locale, :submit - - form_for(:post) do |f| - concat f.submit :class => "extra" - end - - expected = whole_form do - "" - end - - assert_dom_equal expected, output_buffer - ensure - I18n.locale = old_locale - end - def test_submit_with_object_and_nested_lookup old_locale, I18n.locale = I18n.locale, :submit -- cgit v1.2.3 From e3d8331c5b543ea7ea2024d05bd79526d11341c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 18 Nov 2010 20:22:14 +0100 Subject: Revert "Remove deprecated form_for with strings or symbols" This code was not deprecated. What was deprecated is the following: form_for(:foo, @foo) Which now should be rewritten as: form_for(@foo, :as => :foo) The following format is valid: form_for(:foo) This reverts commit be797750e6ce866ea08307f63bf35304a965c8d4. --- actionpack/test/template/erb/form_for_test.rb | 3 +-- actionpack/test/template/erb/helper.rb | 4 +--- actionpack/test/template/form_helper_test.rb | 33 +++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 5 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/template/erb/form_for_test.rb b/actionpack/test/template/erb/form_for_test.rb index 02f07496e0..e722b40a9a 100644 --- a/actionpack/test/template/erb/form_for_test.rb +++ b/actionpack/test/template/erb/form_for_test.rb @@ -1,11 +1,10 @@ require "abstract_unit" require "template/erb/helper" -require "controller/fake_models" module ERBTest class TagHelperTest < BlockTestCase test "form_for works" do - output = render_content "form_for(Post.new, :url => {:controller => 'blah', :action => 'update'})", "" + output = render_content "form_for(:staticpage, :url => {:controller => 'blah', :action => 'update'})", "" assert_match %r{.*}, output end end diff --git a/actionpack/test/template/erb/helper.rb b/actionpack/test/template/erb/helper.rb index fb9d0315f3..799f9e4036 100644 --- a/actionpack/test/template/erb/helper.rb +++ b/actionpack/test/template/erb/helper.rb @@ -4,8 +4,6 @@ module ERBTest include ActionView::Helpers::TagHelper include ActionView::Helpers::JavaScriptHelper include ActionView::Helpers::FormHelper - include ActionView::Context - include ActionController::RecordIdentifier attr_accessor :output_buffer, :controller @@ -22,4 +20,4 @@ module ERBTest "<%= #{str} do %>#{rest}<% end %>" end end -end +end \ No newline at end of file diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 7179ae4e9c..2c60096475 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -781,6 +781,23 @@ class FormHelperTest < ActionView::TestCase assert_dom_equal expected, output_buffer end + def test_form_for_without_object + form_for(:post, :html => { :id => 'create-post' }) do |f| + concat f.text_field(:title) + concat f.text_area(:body) + concat f.check_box(:secret) + end + + expected = whole_form("/", "create-post") do + "" + + "" + + "" + + "" + end + + assert_dom_equal expected, output_buffer + end + def test_form_for_with_index form_for(@post, :as => "post[]") do |f| concat f.label(:title) @@ -850,6 +867,22 @@ class FormHelperTest < ActionView::TestCase I18n.locale = old_locale end + def test_submit_without_object_and_locale_strings + old_locale, I18n.locale = I18n.locale, :submit + + form_for(:post) do |f| + concat f.submit :class => "extra" + end + + expected = whole_form do + "" + end + + assert_dom_equal expected, output_buffer + ensure + I18n.locale = old_locale + end + def test_submit_with_object_and_nested_lookup old_locale, I18n.locale = I18n.locale, :submit -- cgit v1.2.3 From 52b71c01fd3c8a87152f55129a8cb3234190734a Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 16 Nov 2010 19:57:09 -0200 Subject: Revert "Quick fix for not escaping []s (not ideal)" According to http://www.ietf.org/rfc/rfc2616.txt and http://tools.ietf.org/rfc/rfc3986.txt [ and ] are reserved characters and should be escaped using "%" HEX HEX This reverts commit 856d2fd874d72dd9f83204affff4edfef3308361 and 1ee9b40b18a0bed5bb10a0785f7e2730bac983f6.. --- actionpack/test/controller/routing_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index ce5c899a19..cd067b7d18 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1444,7 +1444,7 @@ class RouteSetTest < ActiveSupport::TestCase end def test_expand_array_build_query_string - assert_uri_equal '/foo?x[]=1&x[]=2', default_route_set.generate({:controller => 'foo', :x => [1, 2]}) + assert_uri_equal '/foo?x%5B%5D=1&x%5B%5D=2', default_route_set.generate({:controller => 'foo', :x => [1, 2]}) end def test_escape_spaces_build_query_string_selected_keys @@ -1744,9 +1744,9 @@ class RackMountIntegrationTests < ActiveSupport::TestCase assert_equal '/posts', @routes.generate({:controller => 'posts'}, {:controller => 'posts', :action => 'index'}) assert_equal '/posts/create', @routes.generate({:action => 'create'}, {:controller => 'posts'}) assert_equal '/posts?foo=bar', @routes.generate(:controller => 'posts', :foo => 'bar') - assert_equal '/posts?foo[]=bar&foo[]=baz', @routes.generate(:controller => 'posts', :foo => ['bar', 'baz']) + assert_equal '/posts?foo%5B%5D=bar&foo%5B%5D=baz', @routes.generate(:controller => 'posts', :foo => ['bar', 'baz']) assert_equal '/posts?page=2', @routes.generate(:controller => 'posts', :page => 2) - assert_equal '/posts?q[foo][a]=b', @routes.generate(:controller => 'posts', :q => { :foo => { :a => 'b'}}) + assert_equal '/posts?q%5Bfoo%5D%5Ba%5D=b', @routes.generate(:controller => 'posts', :q => { :foo => { :a => 'b'}}) assert_equal '/news.rss', @routes.generate(:controller => 'news', :action => 'index', :format => 'rss') -- cgit v1.2.3 From deff5289474d966bb12ae18c1b816df3eeb11f27 Mon Sep 17 00:00:00 2001 From: Henning Koch Date: Fri, 19 Nov 2010 18:16:54 +0100 Subject: Fix AssetIncludeTag ensuring that files are in the wrong directory [#6015 state:resolved] Signed-off-by: Santiago Pastorino --- actionpack/test/template/asset_tag_helper_test.rb | 44 +++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index 139d832c5f..fbcc99a17a 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -680,6 +680,26 @@ class AssetTagHelperTest < ActionView::TestCase FileUtils.rm_f(File.join(ActionView::Helpers::AssetTagHelper::JAVASCRIPTS_DIR, 'money.js')) end + def test_caching_javascript_include_tag_with_named_paths_and_relative_url_root_when_caching_off + ENV["RAILS_ASSET_ID"] = "" + @controller.config.relative_url_root = "/collaboration/hieraki" + config.perform_caching = false + + assert_dom_equal( + %(), + javascript_include_tag('robber', :cache => true) + ) + + assert !File.exist?(File.join(ActionView::Helpers::AssetTagHelper::JAVASCRIPTS_DIR, 'all.js')) + + assert_dom_equal( + %(), + javascript_include_tag('robber', :cache => "money", :recursive => true) + ) + + assert !File.exist?(File.join(ActionView::Helpers::AssetTagHelper::JAVASCRIPTS_DIR, 'money.js')) + end + def test_caching_javascript_include_tag_when_caching_off ENV["RAILS_ASSET_ID"] = "" config.perform_caching = false @@ -907,6 +927,30 @@ class AssetTagHelperTest < ActionView::TestCase FileUtils.rm_f(File.join(ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR, 'money.css')) end + + def test_caching_stylesheet_link_tag_with_named_paths_and_relative_url_root_when_caching_off + ENV["RAILS_ASSET_ID"] = "" + @controller.config.relative_url_root = "/collaboration/hieraki" + config.perform_caching = false + + assert_dom_equal( + %(), + stylesheet_link_tag('robber', :cache => true) + ) + + assert !File.exist?(File.join(ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR, 'all.css')) + + assert_dom_equal( + %(), + stylesheet_link_tag('robber', :cache => "money") + ) + + assert !File.exist?(File.join(ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR, 'money.css')) + end + + + + def test_caching_stylesheet_include_tag_when_caching_off ENV["RAILS_ASSET_ID"] = "" config.perform_caching = false -- cgit v1.2.3 From 938243feb9ea177b84276821818c9eed66064340 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 19 Nov 2010 16:26:09 -0800 Subject: do not require ruby-debug automatically. please require it if you have declared it as a dependency --- actionpack/test/abstract_unit.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 92597e40ff..60534a9746 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -36,14 +36,6 @@ require 'active_record' require 'action_controller/caching' require 'action_controller/caching/sweeping' -begin - require 'ruby-debug' - Debugger.settings[:autoeval] = true - Debugger.start -rescue LoadError - # Debugging disabled. `gem install ruby-debug` to enable. -end - require 'pp' # require 'pp' early to prevent hidden_methods from not picking up the pretty-print methods until too late module Rails -- cgit v1.2.3 From d5779efaf2375466ab557868e586b9dbd942abc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 20 Nov 2010 21:56:08 +0100 Subject: Ensure calling reset session twice does not raise errors. --- actionpack/test/activerecord/active_record_store_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/activerecord/active_record_store_test.rb b/actionpack/test/activerecord/active_record_store_test.rb index 7c595d1b89..f0fb113860 100644 --- a/actionpack/test/activerecord/active_record_store_test.rb +++ b/actionpack/test/activerecord/active_record_store_test.rb @@ -23,6 +23,7 @@ class ActiveRecordStoreTest < ActionDispatch::IntegrationTest def call_reset_session session[:foo] reset_session + reset_session if params[:twice] session[:foo] = "baz" head :ok end @@ -94,6 +95,17 @@ class ActiveRecordStoreTest < ActionDispatch::IntegrationTest end end + def test_calling_reset_session_twice_does_not_raise_errors + with_test_route_set do + get '/call_reset_session', :twice => "true" + assert_response :success + + get '/get_session_value' + assert_response :success + assert_equal 'foo: "baz"', response.body + end + end + def test_setting_session_value_after_session_reset with_test_route_set do get '/set_session_value' -- cgit v1.2.3