Commit Graph

1861 Commits

Author SHA1 Message Date
Arun Agrawal
244dcfea47 ActionPack test fix for RBX 2011-10-24 14:11:20 +05:30
Jeremy Kemper
bceec4c3c3 / is allowed in URI fragments 2011-10-13 21:41:30 -07:00
Santiago Pastorino
8f11d53506 Merge pull request #2219 from kommen/fix_fragment_caching_squashed
Fix fragment caching (squashed commits)
2011-10-13 13:36:20 -07:00
Alexey Vakhov
50d262f52a Support symbol and string actions in AC#respond_to options 2011-10-11 12:48:03 +04:00
Denis Odorcic
a0a68ecbb2 JSON responder should return errors with :error root 2011-10-10 01:42:12 -04:00
Ben Scheirman
d68f27e9b1 accept optional :host parameter to force_ssl 2011-10-08 18:38:02 -05:00
Kamil Sobieraj
de942e5534 :subdomain can now be specified with a value of false in url_for, allowing for subdomain(s) removal from the host during link generation. Closes #2025 2011-10-04 09:16:34 +01:00
Alexey Vakhov
8e946daf69 normalize arg for AC::TestCase tests class method 2011-10-03 12:12:07 +04:00
José Valim
6e8fe1bf02 TestCase should respect the view_assigns API instead of pulling variables on its own. 2011-10-02 11:29:13 +02:00
Santiago Pastorino
3de95fd930 Revert "Make process reuse the env var passed as argument"
This reverts commit 0e4748cd41.
2011-09-24 17:19:42 -03:00
José Valim
43d27e9105 Deprecate passing the template handler in the template name.
For example, calling hello.erb is now deprecated. Since Rails 3.0
passing the handler had no effect whatsover. This commit simply
deprecates such cases so we can clean up the code in later releases.
2011-09-22 15:37:38 +02:00
José Valim
119e9e2daf Get rid of update_details in favor of passing details to find_template. 2011-09-22 15:03:05 +02:00
Aaron Patterson
a08bee7841 all routes can be stored in the Journey Routes object 2011-09-12 16:50:48 -07:00
Mike Dillon
dbef311819 Use ensure instead of rescue 2011-09-10 11:01:22 -07:00
Mike Dillon
538fb18dea Add test for warning and CHANGELOG entry 2011-09-10 09:51:55 -07:00
Aaron Patterson
ac1a363c6e Pull up a method we only use once. 2011-09-08 16:04:57 -07:00
Aaron Patterson
41a085ebc9 Conditions must never be equal 2011-09-08 16:04:57 -07:00
Jon Leighton
16f1ce41d5 Merge pull request #2499 from akaspick/assert_select_email_fix
Fix assert_select_email to work on non-multipart emails as well as converting the Mail::Body to a string to prevent errors.
2011-09-07 05:51:31 -07:00
Aaron Patterson
f6ced69a11 Eliminate newlines in basic auth. fixes #2882 2011-09-06 17:25:20 -07:00
Santiago Pastorino
a1fa756e17 * is not allowed in windows file names. Closes #2574 #2847 2011-09-04 17:44:48 -03:00
Andrew White
ebea387e4b Add failing test case for #2654 2011-08-23 15:33:59 +01:00
Andrew White
14cf4b2e35 Don't modify params in place - fixes #2624 2011-08-23 11:07:37 +01:00
Aaron Patterson
5f94b93279 Properly escape glob characters. 2011-08-16 15:28:27 -07:00
Jon Leighton
8e23615245 Use lazy load hooks to set parameter wrapping configuration. This means that it doesn't force Action Controller / Active Record to load, but it doesn't fail if they have already loaded. Thanks @josevalim for the hint. 2011-08-16 19:14:20 +01:00
Jon Leighton
6c5f67cac1 Don't refer to ActionController::Base in the wrap_parameters initializer - use config object instead. Cuts about 15% off the load time. (#734) 2011-08-16 00:59:59 +01:00
Franck Verrot
75dd33a0ae Methods like status and location are interfering with redirect_to [Closes #2511] 2011-08-14 19:00:30 +02:00
Aaron Patterson
943a37348a moving test_generate to an integration test with one assert per test 2011-08-12 15:55:00 -07:00
Andrew Kaspick
60d358b233 fix assert_select_email to work on non-multipart emails as well as converting the Mail::Body to a string to prevent errors. 2011-08-11 17:49:31 -05:00
thoefer
860202e8b2 Fix the issue where default_url_options is being cached on test cases. Closes #1872. Closes #2031.
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-08-01 11:49:24 +02:00
Santiago Pastorino
d701b3fa47 Merge pull request #2379 from arunagw/extra_require_removal
Removing extra requires from the test. Already loaded in abstract_unit.
2011-07-31 11:50:52 -07:00
Arun Agrawal
ec7457ed2a Removing extra requires from the test. Already loaded in abstract_unit. 2011-07-31 23:36:21 +05:30
Vishnu Atrai
070513016f remove extra require for 'active_support/dependencies' as it is required in abstract_unit.rb 2011-07-31 23:12:28 +05:30
thedarkone
4d4d2179f6 There is no need to be destructive with the passed-in options.
This fixes a bug that is caused by Resource/SingletonResource mangling resource options when using inline "multi"-resource declarations.
2011-07-28 20:00:48 +02:00
Gaston Ramos
dc1b0fd957 - added ActionView::PartialRenderer#merge_path_into_partial(path, partial)
fix issues/1951
2011-07-24 00:54:58 -03:00
Gaston Ramos
7621d131d2 - added test case for issue:
https://github.com/rails/rails/issues/1951
  Namespaced model partial_path is wrong in namespaced controllers
2011-07-24 00:54:45 -03:00
Jesse Storimer
ac81af40c0 Ensure that status codes are logged properly
Needed to move AC::Metal::Instrumentation before AM::Metal::Rescue
so that status codes rendered from rescue_from blocks are logged
properly.
2011-07-18 13:42:07 -04:00
José Valim
7da88c5b29 Remove stream at the class level.
This is because only template rendering works with streaming.
Setting it at the class level was also changing the behavior
of JSON and XML responses, closes #1337.
2011-07-06 20:24:30 -03:00
Damien Mathieu
ac15bcebf2 provide a more explicit message when using url_for with nil
This fixes the problem of having a non-explicit message when the :location option is not provided in respond_with.
2011-07-02 18:53:54 +02:00
José Valim
9c9ec2172e Make sure respond_with with :js tries to render a template in all cases 2011-06-30 11:47:36 -03:00
Esad Hajdarevic
2a61d47b55 Make send_file guess content-type from file extension, if type wasn't supplied (Issue #1847). Update tests & documentation. 2011-06-28 06:58:28 +02:00
David Chelimsky
a7af1e0051 Get the fixture_path from self.class instead of ActiveSupport::TestCase.
This allows test classes that are not subclasses of
ActiveSupport::TestCase (like those in rspec-rails) to interact with
with this variable without having to reference ActiveSupport::TestCase.
2011-06-25 13:59:49 -05:00
Jeroen Jacobs
93ff522120 Tests only after filters in cache sweepers 2011-06-22 18:00:46 +02:00
Neeraj Singh
f3c9f32664 remove meaningless assert true 2011-06-11 03:11:06 -04:00
Neeraj Singh
6688b6393a expected message should come first 2011-06-11 03:11:06 -04:00
Neeraj Singh
5da89af6f6 try not to use assert_blank when nil will would
be considered as failure

Test for specific value to the extent possible
2011-06-11 03:11:05 -04:00
Neeraj Singh
06d772c0ce add missing ensure 2011-06-10 02:48:44 -04:00
Neeraj Singh
fdbe8eb08c replaced and with && as per coding guidelines 2011-06-10 02:27:57 -04:00
Neeraj Singh
49d032929b The test name is misleading. It says
test_should_cache_with_trailing_slash_on_url

A trailing slash is removed when a page is cached.

What the test meant to say was : a url with trailing slash
should be cached and the cached page should not have any
trailing slash.

This patch clarifies the name a bit.
2011-06-10 02:24:37 -04:00
Neeraj Singh
fa5b34ed22 remove unused user_controller from test 2011-06-08 22:49:38 -04:00
Andrew White
d4658d86fe Refactor ActionController::TestCase cookies
Assigning cookies for test cases should now use cookies[], e.g:

  cookies[:email] = 'user@example.com'
  get :index
  assert_equal 'user@example.com', cookies[:email]

To clear the cookies, use clear, e.g:

  cookies.clear
  get :index
  assert_nil cookies[:email]

We now no longer write out HTTP_COOKIE and the cookie jar is
persistent between requests so if you need to manipulate the environment
for your test you need to do it before the cookie jar is created.
2011-06-04 07:09:11 +01:00