diff options
author | Xavier Noria <fxn@hashref.com> | 2010-06-07 15:44:57 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-06-07 15:44:57 +0200 |
commit | 9e065c6bc175621ad30a416c8c4345f95ce3c264 (patch) | |
tree | 505df4243727a00d1f030205f2e64afe0d098e5e /actionpack/test | |
parent | 0dbc732995a526354fb1e3c732af5dacdb863dda (diff) | |
parent | 1a8f784a236058101c6e8b6387aefc96e86a1e54 (diff) | |
download | rails-9e065c6bc175621ad30a416c8c4345f95ce3c264.tar.gz rails-9e065c6bc175621ad30a416c8c4345f95ce3c264.tar.bz2 rails-9e065c6bc175621ad30a416c8c4345f95ce3c264.zip |
Merge remote branch 'rails/master'
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 12 | ||||
-rw-r--r-- | actionpack/test/template/lookup_context_test.rb | 16 |
2 files changed, 14 insertions, 14 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 180889ddf2..ffa4f50b00 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -28,6 +28,10 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest post :reset resource :info + + member do + get :crush + end end match 'account/logout' => redirect("/logout"), :as => :logout_redirect @@ -352,6 +356,14 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest end end + def test_member_on_resource + with_test_routes do + get '/session/crush' + assert_equal 'sessions#crush', @response.body + assert_equal '/session/crush', crush_session_path + end + end + def test_redirect_modulo with_test_routes do get '/account/modulo/name' diff --git a/actionpack/test/template/lookup_context_test.rb b/actionpack/test/template/lookup_context_test.rb index df1aa2edb2..cc71cb42d0 100644 --- a/actionpack/test/template/lookup_context_test.rb +++ b/actionpack/test/template/lookup_context_test.rb @@ -26,18 +26,6 @@ class LookupContextTest < ActiveSupport::TestCase assert_equal :en, @lookup_context.locale end - test "allows me to update details" do - @lookup_context.update_details(:formats => [:html], :locale => :pt) - assert_equal [:html], @lookup_context.formats - assert_equal :pt, @lookup_context.locale - end - - test "allows me to update an specific detail" do - @lookup_context.update_details(:locale => :pt) - assert_equal :pt, I18n.locale - assert_equal :pt, @lookup_context.locale - end - test "allows me to freeze and retrieve frozen formats" do @lookup_context.formats.freeze assert @lookup_context.formats.frozen? @@ -54,7 +42,7 @@ class LookupContextTest < ActiveSupport::TestCase end test "provides getters and setters for formats" do - @lookup_context.formats = :html + @lookup_context.formats = [:html] assert_equal [:html], @lookup_context.formats end @@ -138,7 +126,7 @@ class LookupContextTest < ActiveSupport::TestCase keys << @lookup_context.details_key assert_equal 2, keys.uniq.size - @lookup_context.formats = :html + @lookup_context.formats = [:html] keys << @lookup_context.details_key assert_equal 3, keys.uniq.size |