Jeremy Kemper
a595abff21
Unknown :format param should result in empty request.formats
2009-11-08 12:12:58 -08:00
Jeremy Kemper
425a02cece
Ruby 1.9: resolve constant lookup issues
2009-11-04 15:41:50 -08:00
Jeremy Kemper
52e2bbd5c0
Ruby 1.9: work around constant resolution behavior change :(
2009-11-04 14:51:54 -08:00
Joshua Peek
f950d0b4af
Fix simple resource named routes for new routing dsl
2009-11-03 11:23:22 -06:00
Joshua Peek
07da304ff8
Some more generation tests
2009-10-27 21:02:21 -05:00
Joshua Peek
43e0bc1c9f
Extract routing controller stub helper into abstract unit
2009-10-27 21:02:20 -05:00
Joshua Peek
e296ea056e
Enable named route tests
2009-10-27 21:02:20 -05:00
Joshua Peek
759f2ccc4c
Start migrating AC routing tests into dispatch folder
2009-10-27 21:02:20 -05:00
Joshua Peek
a5c82a9dfb
Start rewriting some internal tests to use the new routing dsl
2009-10-20 16:03:55 -05:00
Yehuda Katz
ef70ad5538
Fix a few more 1.9 bugs. Rack 1.0.1 is required for 1.9 compliance but not release, so bundling 1.0.1 from git
2009-10-15 17:16:42 -07:00
Jeffrey Hardy
a8dc9fd27b
CookieJar#delete should return the key's value, consistent with a Hash
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-10-14 11:50:51 -07:00
Joshua Peek
b480da5cd6
Coerce all out going body parts to Strings
2009-10-05 13:58:43 -05:00
Joshua Peek
84e94551f6
Add custom "with_routing" to internal tests to fix reseting session after using
...
with_routing. This only affects our internal AP tests.
2009-10-03 20:45:49 -05:00
Joshua Peek
acfeec5151
Allow integration test rack app to be set with "@app" ivar instead of using open_session
2009-09-26 20:51:05 -05:00
Joshua Peek
02413baabb
Fix skipping memcache tests if a memcache server isn't running
2009-09-26 20:02:47 -05:00
Joshua Peek
1f72700575
Move default middleware stack into initializer
2009-09-26 13:41:32 -05:00
Joshua Peek
0c638b3406
Clean up session integration tests so they don't reference AC::Dispatcher
2009-09-26 12:56:53 -05:00
Joshua Peek
ef58194129
Move Rails::Static into ActionDispatch
2009-09-26 11:37:42 -05:00
Joshua Peek
f5ace625fe
Ensure changes to I18n locale get reset during tests
2009-09-19 13:22:09 -05:00
Jay Pignata
e0f1a7dc19
If session_options[:id] is requested when using CookieStore, unmarshal the session to access it [ #2268 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-03 11:50:01 -05:00
Joshua Peek
a79790e1a5
rack-test 0.4.2 has rack 1.1.pre goodies, we'll use it instead
2009-08-31 23:08:20 -05:00
Joshua Peek
ba5995dcd9
Reset session in integration tests after changing routes to reload the middleware stack
2009-08-27 12:43:26 -05:00
Jay Pignata
679128da58
Adding a call to logger from params_parser to give detailed debug information when invalid xml or json is posted
...
[#2481 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-15 16:51:03 -07:00
Yehuda Katz
1310231c15
Got tests to pass with some more changes.
...
* request.formats is much simpler now
* For XHRs or Accept headers with a single item, we use the Accept header
* For other requests, we use params[:format] or fallback to HTML
* This is primarily to work around the fact that browsers provide completely
broken Accept headers, so we have to whitelist the few cases we can
specifically isolate and treat other requests as coming from the browser
* For APIs, we can support single-item Accept headers, which disambiguates
from the browsers
* Requests to an action that only has an XML template from the browser will
no longer find the template. This worked previously because most browsers
provide a catch-all */*, but this was mostly accidental behavior. If you
want to serve XML, either use the :xml format in links, or explicitly
specify the XML template: render "template.xml".
2009-08-15 12:32:02 -07:00
Yehuda Katz
02d9dd9000
Add some more caching to the lookup
2009-08-11 15:03:52 -07:00
Felipe Talavera
654568e71b
Allow to configure trusted proxies via ActionController::Base.trusted_proxies [ #2126 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 16:56:18 +01:00
Yehuda Katz
b53f006901
Remove legacy processing and content_length
...
* convert_content_type! is handled by assign_default_content_type_and_charset!
* set_content_length! should be handled by the endpoint server. Otherwise
each middleware that modifies the body has to do the expensive work of
recalculating content_length.
* convert_language! appears to be legacy. There are no tests for this
* convert_cookies! should be handled by the new HeaderHash in Rack
* Use an integer for .status's internal representation to avoid needing to
do String manipulation just to find out the status
2009-08-02 19:39:33 -04:00
Yehuda Katz
503ce1d01c
Update cache_control to be a Hash of options that is used to build the header.
...
* Significantly simplifies setting and modifying cache control in other areas
2009-08-02 19:39:33 -04:00
José Valim
67b2d08c0a
Ensure that the proper accept header value is set during tests.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:03 -07:00
José Valim
b51632d34d
Improve request test coverage by adding formats and negotiate_mime tests.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:02 -07:00
Yehuda Katz + Carl Lerche
4fad953f90
Fixing pending tests and fixed some formats / partial rendering semantics
2009-06-17 12:54:19 -07:00
Yehuda Katz + Carl Lerche
86fc43fd58
ActionPack components should no longer have undeclared dependencies.
...
* Tests can be run in isolation
* Dependencies added
* A few tests modified to avoid depending on AS deps
not depended on my files they were testing
2009-06-08 13:34:07 -07:00
Joshua Peek
a1140a1031
Revert "Only save the session if we're actually writing to it [ #2703 state:resolved]"
...
This reverts commit dd98280e38 .
2009-05-30 09:36:08 -05:00
Johan Sörensen
dd98280e38
Only save the session if we're actually writing to it [ #2703 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-28 09:35:17 -05:00
Carl Lerche
a1f280e83d
Got all the dispatch tests running on new base
2009-05-26 15:03:09 -07:00
Pratik Naik
9cda410d81
Make cookie store tests pass with the new base
2009-05-25 16:52:44 +02:00
Joshua Peek
8118fca9be
Merge Failsafe middleware into ShowExceptions
2009-05-17 12:24:59 -05:00
Joshua Peek
11af089cee
Extract ActionController rescue templates into Rescue and ShowExceptions middleware.
...
This commit breaks all exception catching plugins like ExceptionNotifier. These plugins should be rewritten as middleware instead overriding Controller#rescue_action_in_public.
2009-05-02 23:02:22 -05:00
Jeremy Kemper
1c6fcbfd2d
Fix implicit ordering expectation
2009-05-02 15:30:00 -07:00
Joshua Peek
a6fff94baf
Move TestRequest cookies accessor into AD TestRequest
2009-04-30 19:23:50 -05:00
Joshua Peek
d54604c352
Depend on unreleased rack 1.1
2009-04-30 19:10:05 -05:00
Joshua Peek
00d1a57e9f
Start moving TestRequest and TestResponse into ActionDispatch
2009-04-30 17:26:03 -05:00
Joshua Peek
ba9887c9c0
Switch to action_dispatch rack namespace
2009-04-30 13:45:12 -05:00
Jeremy Kemper
dde063507a
Can't please them all
2009-04-27 09:29:17 -07:00
Jeremy Kemper
c2b4da1c42
Sufficient to test that multipart/mixed wasn't parsed to a hash
2009-04-27 00:17:02 -07:00
Joshua Peek
0494909679
Inherit TestSession from Session::AbstractStore and add indifferent access to Session::AbstractStore.
2009-04-26 14:33:57 -05:00
Joshua Peek
5352a2417b
Move useful response test helpers into request
2009-04-26 11:12:33 -05:00
Joshua Peek
dbbe2e74ff
Create a new file for response tests
2009-04-26 10:26:53 -05:00
Joshua Peek
4f412a10b6
Remove RewindableInput middleware since all input MUST be rewindable according to a recent change in the Rack 1.0 SPEC
2009-04-25 14:04:03 -05:00
Joshua Peek
b69da86ea5
Remove vendored version of Rack
2009-04-25 13:56:37 -05:00