1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

14 commits

Author SHA1 Message Date
Andrew White
1c7bcde92d Add failing test case for #6053 2012-04-29 20:20:59 +01:00
Andrew White
7a80b69e00 Don't convert params if the request isn't HTML - fixes #5341 2012-04-29 10:15:54 +01:00
Andrew White
5c18bdca32 Merge session arg with existing session instead of overwriting
This may break existing tests that are asserting the whole session contents
but should not break existing tests that are asserting individual keys - e.g:

class SomeControllerTest < ActionController::TestCase
  setup do
    session['user_id'] = 1
  end

  test "some test" do
    get :some_action, nil, { 'another_var' => 2 }

    # This assertion will now fail
    assert_equal({ 'another_var' => 2 }, session)

    # This assertion will still pass
    assert_equal 2, session['another_var]
  end
end

Fixes #1529.
2012-04-28 22:36:16 +01:00
Jose and Yehuda
56cdc81c08 Remove default match without specified method
In the current router DSL, using the +match+ DSL
method will match all verbs for the path to the
specified endpoint.

In the vast majority of cases, people are
currently using +match+ when they actually mean
+get+. This introduces security implications.

This commit disallows calling +match+ without
an HTTP verb constraint by default. To explicitly
match all verbs, this commit also adds a
:via => :all option to +match+.

Closes #5964
2012-04-24 22:52:26 -05:00
Will Bryant
185c3dbc6a assigns(:foo) should not convert @foo's keys to strings if it happens to be a hash 2012-02-18 23:41:07 +13:00
ganesh
b314524128 replacing the orderhash with hash for ruby-1.9 2012-02-09 15:53:06 +05:30
Carlos Antonio da Silva
562a12df29 Rename test class and fix tests to keep consistency
Based on 50d23bc2bd.
2012-01-17 10:04:38 -02:00
Carlos Antonio da Silva
71566c3573 Remove rescue_action from compatibility module and tests 2012-01-17 10:04:37 -02:00
Rafael Mendonça França
3f38d8442e AC:TestCase::Behavior#head only accepts parameters as second argument 2012-01-10 02:01:10 -03:00
Rafael Mendonça França
f2494b536b Whitespaces ✂️ 2012-01-10 02:01:10 -03:00
Rafael Mendonça França
30f9af9c09 Fix ActionController::TestCase::Behavior.head 2012-01-10 02:00:20 -03:00
Aaron Patterson
4d073df43d Revert "remove deprecated API"
This reverts commit f53c247d10.
2012-01-05 14:52:49 -08:00
Aaron Patterson
f53c247d10 remove deprecated API 2012-01-05 14:46:34 -08:00
Nick Sutterer
50d23bc2bd moving test_test.rb to test_case_test.rb for consistency. 2012-01-03 11:50:03 +01:00
Renamed from actionpack/test/controller/test_test.rb (Browse further)