Commit Graph

18 Commits

Author SHA1 Message Date
Aaron Patterson
a7826bd8b7 Merge branch 'master' into testclean
* master:
  Add documentation for inheritance_column method
  Use ArgumentError vs. RuntimeError, which is more precise.
  CSV fixtures aren't supported by default anymore, update generated test_helper.rb to reflect that
  fix quoting for ActiveSupport::Duration instances
  Add few information on the field types
  Add the options method to action_controller testcase.
2012-07-05 14:03:57 -07:00
François de Metz
0303c2325f Add the options method to action_controller testcase.
Signed-off-by: François de Metz <francois@stormz.me>
2012-07-04 15:00:00 +02:00
Aaron Patterson
b5442b5a3a test should be testing to_param not to_s, remove Array subclass 2012-07-03 16:35:07 -07:00
Tim Vandecasteele
8471edc672 Don't paramify ActionDispatch::Http::UploadedFile in tests
To test uploading a file without using fixture_file_upload, a posted
ActionDispatch::Http::UploadedFile should not be paramified (just like
Rack::Test::UploadedFile).
(Rack::Test::UploadedFile and ActionDispatch::Http::UploadedFile don't
share the same API, tempfile is not accessible on
Rack::Test::UploadedFile as discussed in
https://github.com/brynary/rack-test/issues/30)
2012-06-22 09:27:41 +02:00
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 50d23bc2bd3653b3c66e480c22ae97c5f7fd7f62.
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 f53c247d10acbaacb0d61824cfce888c4b0520d2.
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