diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index b03dc3132b04d4f824f3c797a27229735f27e8db..624dd2a23f18eb4b711e8d53f304cd3a673cd47c 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -11,6 +11,10 @@ def setup boot_rails end + def app + @app ||= Rails.application + end + test "assets routes have higher priority" do app_file "app/assets/javascripts/demo.js.erb", "<%= :alert %>();" @@ -23,5 +27,32 @@ def setup get "/assets/demo.js" assert_match "alert()", last_response.body end + + test "does not stream session cookies back" do + puts "PENDING SPROCKETS AND RACK RELEASE" + # app_file "app/assets/javascripts/demo.js.erb", "<%= :alert %>();" + # + # app_file "config/routes.rb", <<-RUBY + # AppTemplate::Application.routes.draw do + # match '/omg', :to => "omg#index" + # end + # RUBY + # + # require "#{app_path}/config/environment" + # + # class ::OmgController < ActionController::Base + # def index + # flash[:cool_story] = true + # render :text => "ok" + # end + # end + # + # get "/omg" + # assert_equal 'ok', last_response.body + # + # get "/assets/demo.js" + # assert_match "alert()", last_response.body + # assert_equal nil, last_response.headers["Set-Cookie"] + end end end