kennyj
a1986e7d55
Use default charset when we read content type without charset.
2011-12-07 12:35:44 +09:00
José Valim
2ab2077235
Fix failing cascade exception.
2011-12-03 11:38:25 +01:00
José Valim
6a4606d3a6
Remove unnecessary test setup.
2011-12-01 21:17:11 +01:00
José Valim
f9edc079e0
Split and improve show and debug exceptions middlewares.
2011-12-01 21:15:42 +01:00
José Valim
750bb5c865
Split ShowExceptions responsibilities in two middlewares.
2011-12-01 20:46:18 +01:00
lest
fe7d4f09ef
put backtrace_cleaner to env
2011-11-28 19:25:37 +03:00
lest
cd9d28d6fd
middlewares should use logger from env
2011-11-25 13:09:46 +03:00
lest
98a1717e7c
configuration option to always write cookie
2011-11-23 23:50:04 +03:00
kennyj
ea70e027b6
Remove unreachable code, and add additional testcases.
2011-11-24 00:25:34 +09:00
lest
c6d6b28bb4
refactor show exceptions tests
2011-11-22 11:38:55 +03:00
lest
a9e8cf78fd
add ActionController::Metal#show_detailed_exceptions?
2011-11-22 11:38:24 +03:00
Aaron Patterson
99d94f126d
Refactoring the redirect method for the router api.
2011-11-18 10:51:12 -08:00
Aaron Patterson
0809c675ef
remove the :path feature to redirects, since it cannot work
2011-11-18 10:51:11 -08:00
Aaron Patterson
4589b2419b
require that all blocks have arity of 2
2011-11-18 10:51:11 -08:00
Andre Arko
b8c85de620
add test for bug fixed in 4f2bf64
2011-11-14 12:29:51 -10:00
Andre Arko
8f0085a483
change tests to expect X-F-F over REMOTE_ADDR
2011-11-13 10:19:54 -10:00
Arun Agrawal
50dfd58fdb
Warnings removed from RequestIdTest
2011-10-22 16:30:48 +05:30
Brian Durand
2b04c2f66e
Add ActionDispatch::Session::CacheStore as a generic way of storing sessions in a cache.
2011-10-21 13:13:29 -05:00
José Valim
f1fecd9b4e
Make tests run on 1.8.x, add integration setup.
2011-10-19 22:09:36 +02:00
David Heinemeier Hansson
ada78066fd
Blah, SecureRandom#uuid is not supported in 1.8.7 -- cant wait for Rails 4.0 to drop compatibility with 1.8.x
2011-10-19 14:45:42 -05:00
David Heinemeier Hansson
afde6fdd5e
Added X-Request-Id tracking and TaggedLogging to easily log that and other production concerns
2011-10-19 12:59:33 -05:00
Jeremy Kemper
401d00d296
Symbol captures may generate multiple path segments, so don't escape / -> %2F. Test splat escaping.
2011-10-13 21:42:15 -07:00
Jeremy Kemper
45ced7e1be
Failing tests for path parameter escaping
2011-10-13 19:02:58 -07:00
Diego Carrion
8f863742e3
allow shorthand routes with nested optional parameters
2011-10-10 19:53:42 -03: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
Vijay Dev
541018a07b
fix deprecation warning in cookie_store_test
...
The options argument to MessageVerifier#initialize should be a hash.
2011-09-25 23:21:37 +05:30
Evgeniy Dolzhenko
86cf3fb5fa
Implement Mime::Type#respond_to? (consistently with #method_missing)
2011-09-25 13:03:01 +01:00
Pawel Pierzchala
019eea4a38
Fix named routes modifying arguments
2011-09-22 09:57:00 +02:00
Aaron Patterson
a08bee7841
all routes can be stored in the Journey Routes object
2011-09-12 16:50:48 -07:00
Aaron Patterson
fdd619e9a7
CookieJar is enumerable. fixes #2795
2011-09-01 13:37:14 -07:00
Andrew Kaspick
61579b7661
when calling url_for with a hash, additional (likely unwanted) values (such as :host) would be returned in the hash... calling #dup on the hash prevents this
2011-08-11 13:28:31 -05:00
Aaron Patterson
ba43b9bf5f
fixing wildcard path matching when wildcard is inside parenthesis
2011-07-26 17:33:22 -07:00
Erik Michaels-Ober
b9c9142603
Allow a route to have :format => true
...
When format is true, it is mandatory (as opposed to :format => false).
This is currently not possible with resource routes, which automatically
make format optional by default.
2011-07-25 11:37:25 -07:00
Santiago Pastorino
8e0061128e
Merge pull request #2245 from davidtrogers/constraints_block_passed_to_following_routes_in_same_scope
...
Memoizing @blocks & disposing of constraints options properly
2011-07-25 10:32:31 -07:00
Dave Rogers
4dc42f5353
Ensure the constraints block is only applied to the correct route
...
addresses issue #1907 - any routes that follow a route with a constraints
block are inheriting the previous route's constraints.
2011-07-25 09:59:53 -07:00
thedarkone
036f77574d
Make polymorphic_url calls go through application helpers again.
...
This brings back the ability to overwrite/extend url generating methods in application heleprs.
2011-07-25 13:43:02 +02:00
ogeidix
1ac802fe3c
Check Accept and Content-Type headers before evaluating them in xhr requests. Closes #2119
...
An xhr request must have an "Accept" or "Content-type" header in order to be considered a request with valid_accept_header.
2011-07-19 22:05:16 +02:00
Bradford Folkens
4755930727
assert nothing raised for setting a cookie value to nil in ActionDispatch
2011-07-14 14:01:39 -05:00
José Valim
f34f0b7e08
Add has_key? and key? methods to CookieJar removed in 0ca69ca65f
2011-06-30 08:01:53 -03:00
Arun Agrawal
8c1f62acda
No need to register again. As it's default now.
...
Removing gif from here because when it got unregister it start failing other places.
2011-06-28 18:20:28 +05:30
Arun Agrawal
1b957177e7
Fix test to use Mime::Zip
2011-06-28 16:51:19 +05:30
Lukáš Konarovský
c0d82ba030
Use assert_equal instead of assert in uploaded file test.
2011-06-15 03:09:27 -07:00
Damien Mathieu
383fd143bf
all requests are utf-8. Don't use the external encoding.
2011-06-14 17:01:33 +02:00
Damien Mathieu
383d56b5ee
encode the uploaded file's name in the default external encoding - Closes #869
2011-06-14 14:34:30 +02:00
Santiago Pastorino
1d3618a9b4
remove warning: assigned but unused variable
2011-06-08 00:26:09 -03:00
Andrew White
e864ff7259
Add backward compatibility for testing cookies
...
This commit restores the ability to assign cookies for testing via
@request.env['HTTP_COOKIE'] and @request.cookies, e.g:
@request.env['HTTP_COOKIE'] = 'user_name=david'
get :index
assert_equal 'david', cookies[:user_name]
and
@request.cookies[:user_name] = 'david'
get :index
assert_equal 'david', cookies[:user_name]
Assigning via cookies[] is the preferred method and will take precedence
over the other two methods. This is so that cookies set in controller
actions have precedence and are carried over between calls to get, post, etc.
2011-06-05 12:34:27 +01:00
Andrew White
0a9270417c
Ensure cookie keys are strings
2011-06-05 12:03:31 +01: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
Josh Kalderimis
d182b6ee9c
removed deprecated methods, and related tests, from ActionPack
2011-05-24 23:38:59 +02:00
Jon Leighton
d411c85a65
Replace references to ActiveSupport::SecureRandom with just SecureRandom, and require 'securerandom' from the stdlib when active support is required.
2011-05-23 20:25:44 +01:00