diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-17 16:51:14 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-17 16:52:12 -0400 |
commit | be199a1d53f9ceae5cfaac185bfd0d9c2a28f9d4 (patch) | |
tree | 32e3c8dd48d1e6879c4284de5b6bc3e5af1bbefd /railties/test/application | |
parent | 42f1ad68655be08a0ff7e5a261d1ad21d3fc90a5 (diff) | |
download | rails-be199a1d53f9ceae5cfaac185bfd0d9c2a28f9d4.tar.gz rails-be199a1d53f9ceae5cfaac185bfd0d9c2a28f9d4.tar.bz2 rails-be199a1d53f9ceae5cfaac185bfd0d9c2a28f9d4.zip |
Add a test case for issue #476.
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/assets_test.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index b03dc3132b..624dd2a23f 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -11,6 +11,10 @@ module ApplicationTests 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 @@ module ApplicationTests 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 |