aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-03-14 22:30:01 +0100
committerJosé Valim <jose.valim@gmail.com>2012-03-14 22:30:01 +0100
commit6db930cb5bbff9ad824590b5844e04768de240b1 (patch)
tree2bc3a70028087aed19b398da96de97a53762f43d /railties/test/application
parent1efeb072bf39c3eeef9a0d8874e58a4bd9850db6 (diff)
downloadrails-6db930cb5bbff9ad824590b5844e04768de240b1.tar.gz
rails-6db930cb5bbff9ad824590b5844e04768de240b1.tar.bz2
rails-6db930cb5bbff9ad824590b5844e04768de240b1.zip
Remove --http.
Diffstat (limited to 'railties/test/application')
-rw-r--r--railties/test/application/generators_test.rb28
-rw-r--r--railties/test/application/initializers/frameworks_test.rb27
-rw-r--r--railties/test/application/middleware_test.rb30
-rw-r--r--railties/test/application/rake_test.rb20
4 files changed, 0 insertions, 105 deletions
diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb
index 15a71260c1..bf58bb3f74 100644
--- a/railties/test/application/generators_test.rb
+++ b/railties/test/application/generators_test.rb
@@ -125,33 +125,5 @@ module ApplicationTests
assert_equal expected, c.generators.options
end
end
-
- test "http only disables options from generators" do
- add_to_config <<-RUBY
- config.generators.http_only!
- RUBY
-
- # Initialize the application
- require "#{app_path}/config/environment"
- Rails.application.load_generators
-
- assert !Rails::Generators.options[:rails][:template_engine],
- "http only should have disabled generator options"
- end
-
- test "http only allow overriding generators options" do
- add_to_config <<-RUBY
- config.generators.helper = true
- config.generators.http_only!
- config.generators.template_engine = :my_template
- RUBY
-
- # Initialize the application
- require "#{app_path}/config/environment"
- Rails.application.load_generators
-
- assert_equal :my_template, Rails::Generators.options[:rails][:template_engine]
- assert_equal true, Rails::Generators.options[:rails][:helper]
- end
end
end
diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb
index cb321f0dd4..a08e5b2374 100644
--- a/railties/test/application/initializers/frameworks_test.rb
+++ b/railties/test/application/initializers/frameworks_test.rb
@@ -130,33 +130,6 @@ module ApplicationTests
assert_equal "false", last_response.body
end
- test "action_controller http initializes successfully" do
- app_file "app/controllers/application_controller.rb", <<-RUBY
- class ApplicationController < ActionController::HTTP
- end
- RUBY
-
- app_file "app/controllers/omg_controller.rb", <<-RUBY
- class OmgController < ApplicationController
- def show
- render :json => { :omg => 'omg' }
- end
- end
- RUBY
-
- app_file "config/routes.rb", <<-RUBY
- AppTemplate::Application.routes.draw do
- match "/:controller(/:action)"
- end
- RUBY
-
- require 'rack/test'
- extend Rack::Test::Methods
-
- get '/omg/show'
- assert_equal '{"omg":"omg"}', last_response.body
- end
-
# AD
test "action_dispatch extensions are applied to ActionDispatch" do
add_to_config "config.action_dispatch.tld_length = 2"
diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb
index 43f86f40e4..2f62d978e3 100644
--- a/railties/test/application/middleware_test.rb
+++ b/railties/test/application/middleware_test.rb
@@ -52,36 +52,6 @@ module ApplicationTests
], middleware
end
- test "http only middleware stack" do
- add_to_config "config.middleware.http_only!"
- add_to_config "config.force_ssl = true"
- add_to_config "config.action_dispatch.x_sendfile_header = 'X-Sendfile'"
-
- boot!
-
- assert_equal [
- "Rack::SSL",
- "Rack::Sendfile",
- "ActionDispatch::Static",
- "Rack::Lock",
- "ActiveSupport::Cache::Strategy::LocalCache",
- "Rack::Runtime",
- "ActionDispatch::RequestId",
- "Rails::Rack::Logger",
- "ActionDispatch::ShowExceptions",
- "ActionDispatch::DebugExceptions",
- "ActionDispatch::RemoteIp",
- "ActionDispatch::Reloader",
- "ActionDispatch::Callbacks",
- "ActiveRecord::ConnectionAdapters::ConnectionManagement",
- "ActiveRecord::QueryCache",
- "ActionDispatch::ParamsParser",
- "ActionDispatch::Head",
- "Rack::ConditionalGet",
- "Rack::ETag"
- ], middleware
- end
-
test "Rack::Sendfile is not included by default" do
boot!
diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb
index 545020357a..b6cbb10141 100644
--- a/railties/test/application/rake_test.rb
+++ b/railties/test/application/rake_test.rb
@@ -132,26 +132,6 @@ module ApplicationTests
assert_no_match(/Errors running/, output)
end
- def test_http_scaffold_tests_pass_by_default
- add_to_config <<-RUBY
- config.middleware.http_only!
- config.generators.http_only!
- RUBY
-
- app_file "app/controllers/application_controller.rb", <<-RUBY
- class ApplicationController < ActionController::HTTP
- end
- RUBY
-
- output = Dir.chdir(app_path) do
- `rails generate scaffold user username:string password:string;
- bundle exec rake db:migrate db:test:clone test`
- end
-
- assert_match(/6 tests, 12 assertions, 0 failures, 0 errors/, output)
- assert_no_match(/Errors running/, output)
- end
-
def test_rake_dump_structure_should_respect_db_structure_env_variable
Dir.chdir(app_path) do
# ensure we have a schema_migrations table to dump