Commit Graph

46 Commits

Author SHA1 Message Date
Joshua Peek
30204c4e66 Set global ActionController::Base.view_paths for test cases 2008-07-12 14:11:51 -05:00
Michael Koziarski
c3aaba0180 Simplify the implementation of assert_redirected_to to normalise the urls before comparing. Also allows for a simpler implementation of redirect_to without most of the recursion.
Also allows for assert_redirected_to @some_record
2008-07-04 10:41:40 +03:00
Michael Koziarski
db58391079 Remove old broken follow_redirect from functional tests. Still works in integration tests.
The follow_redirect in functional tests only worked if you used redirect_to :id=>foo, :action=>bar, rather than named routes.
2008-07-04 10:41:40 +03:00
Joshua Peek
339491a6b3 Set precompiled fixture load path constant to speed up tests 2008-06-25 15:24:12 -05:00
Gabe da Silveira
025515b234 Fix assert_redirected_to for nested controllers and named routes
[#308 state:resolved]

Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-06-04 11:08:58 +12:00
Chris Hapgood
e6f5079a48 Test for assert_response for failure response without an exception. [#141 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-19 11:20:36 +01:00
Jeremy Kemper
9d755f1983 require abstract_unit directly since test is in load path
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:06 +00:00
Jeremy Kemper
3464a7e79c assert_response failures include the exception message. Closes #10688.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8559 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 02:19:48 +00:00
Jeremy Kemper
d9f3c435f9 Fix url_for, redirect_to, etc. with :controller => :symbol instead of 'string'. Closes #8562, #9525.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 19:12:02 +00:00
Michael Koziarski
f81dae3fca Remove deprecated functionality from actionpack. Closes #8958 [lifofifo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7403 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-03 00:18:30 +00:00
Nicholas Seckar
a5fe13e871 Add ActionController::Routing::Helpers, a module to contain common URL helpers such as polymorphic_url.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6722 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-12 04:18:46 +00:00
Jeremy Kemper
cb6d94cc57 Deprecation: remove deprecated redirect methods.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6400 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-13 03:58:22 +00:00
David Heinemeier Hansson
9e4c8b8858 Fix tests depending too deep
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-19 02:25:01 +00:00
Rick Olson
69b0e5c44a Allow Controllers to have multiple view_paths instead of a single template_root. Closes #2754 [John Long]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6120 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-04 20:47:05 +00:00
Jeremy Kemper
dde527440a Remove deprecated assertions.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6055 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 07:00:43 +00:00
Rick Olson
64799454a2 Fix assert_redirected_to bug where redirecting from a nested to to a top-level controller incorrectly added the current controller's nesting. Closes #6128. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5785 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-25 09:34:01 +00:00
Jeremy Kemper
ec75642e13 Merge [5645] from 1.2.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-28 23:41:04 +00:00
Jeremy Kemper
d7674637f9 Deprecation: @request will be removed after 1.2. Use the request method instead.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5201 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-29 07:34:02 +00:00
David Heinemeier Hansson
2caf4d5a93 Added proper getters and setters for content type and charset [DHH] Added utf-8 as the default charset for all renders. You can change this default using ActionController::Base.default_charset=(encoding) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5129 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-17 16:20:32 +00:00
Jeremy Kemper
e04a6e8155 deprecated assertions tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4976 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-04 05:47:51 +00:00
Rick Olson
8c4b599b7c Fix assert_redirected_to issue with named routes for module controllers. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4757 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-13 18:31:58 +00:00
Jeremy Kemper
c40b1a4a67 Deprecate direct usage of @params. Update ActionView::Base for instance var deprecation.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4715 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-07 12:40:14 +00:00
David Heinemeier Hansson
5c30352328 Added support for Mime objects in render :content_type option [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4404 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-02 03:39:56 +00:00
Jamis Buck
b20c575ac0 New routes implementation. Simpler, faster, easier to understand. The published API for config/routes.rb is unchanged, but nearly everything else is different, so expect breakage in plugins and libs that try to fiddle with routes.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4394 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-01 15:42:08 +00:00
Rick Olson
51cd1aec00 Fix assert_redirected_to tests according to real-world usage.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4261 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-25 03:54:46 +00:00
Rick Olson
526c69b49e Diff compared options with #assert_redirected_to [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4248 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-22 15:08:25 +00:00
David Heinemeier Hansson
06c2b43f36 Rendering xml shouldnt happen inside any layout. Added class proxying to RJS, so you can call page.field.clear("my_field") to generate Field.clear("my_field");. Added :content_type option to render, so you can change the content type on the fly. Do type/subtype reordering of Accept header preferences for xml types (aka make Firefox work with respond_to). CHANGED DEFAULT: The default content type for .rxml is now application/xml instead of type/xml, see http://www.xml.com/pub/a/2004/07/21/dive.html for reason
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3852 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-13 01:33:57 +00:00
Jeremy Kemper
7654082260 Major components cleanup and speedup. Closes #3527.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 20:05:11 +00:00
Marcel Molina
0b55ce7191 Value of full_messages on stubbed out AR instances should be an Array.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3352 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-26 19:40:14 +00:00
Tobias Lütke
0279949b05 added assert_valid to AP
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2635 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-16 02:20:53 +00:00
Jamis Buck
50e2474433 Make assert_redirected_to properly check URL's passed as strings #1910 [Scott Barron]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1971 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-06 08:37:25 +00:00
David Heinemeier Hansson
4f40b2d8fb Improved performance of test app req/sec with ~10% refactoring the render method #1823 [Stefan Kaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1915 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-24 16:45:39 +00:00
Jamis Buck
cf9c991d4c Fix test broken by [1648]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1663 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 15:20:25 +00:00
David Heinemeier Hansson
2269c23699 Fixed assert_redirected_to to handle absolute controller paths properly #1472 [Rick Olson/Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1533 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-27 05:36:03 +00:00
David Heinemeier Hansson
930b59eb39 Fixed that Functional tests do not set request.path_parameters properly #1512 [Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1527 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-26 14:36:13 +00:00
David Heinemeier Hansson
0367317dd6 Deprecated redirect_to_path and redirect_to_url in favor of letting redirect_to do the right thing when passed either a path or url. Introduced r as a unified method for render (still under construction)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-22 07:43:05 +00:00
David Heinemeier Hansson
d3704f888b Fixed assert_redirect_to to work with redirect_to_path #869 [Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1332 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-19 19:19:58 +00:00
David Heinemeier Hansson
dca7efa67e Deprecated the majority of all the testing assertions and replaced them with a much smaller core and access to all the collections the old assertions relied on. That way the regular test/unit assertions can be used against these. Added documentation about how to use it all.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1189 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-17 11:38:01 +00:00
David Heinemeier Hansson
a35cf348bf Added a much improved Flash module that allows for finer-grained control on expiration and allows you to flash the current action #839 [Caio Chassot]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@942 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-03-20 19:12:53 +00:00
David Heinemeier Hansson
37249f6a86 Fixed that assert_template_xpath_matches did not indicate when a path was not found #658 [Eric Hodel]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@665 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-18 17:13:57 +00:00
David Heinemeier Hansson
65f834ad45 Stringify the parameters on follow_redirect
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@587 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-12 21:54:34 +00:00
David Heinemeier Hansson
61a6a440cb Added follow_redirect method for functional tests that'll get-request the redirect that was made.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@585 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-12 19:35:30 +00:00
David Heinemeier Hansson
098fa94356 Fixed documentation snafus #575, #576, #577, #585
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@525 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-07 14:15:53 +00:00
David Heinemeier Hansson
c8d68dfed3 Killed the out of place alias and made sure you can use the different HTTP methods within the same testaction
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@80 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-08 10:43:24 +00:00
David Heinemeier Hansson
a544d7aa37 Added all the HTTP methods as alternatives to the generic "process" for functional testing #276 [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@58 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 11:10:46 +00:00
David Heinemeier Hansson
db045dbbf6 Initial
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-24 01:04:44 +00:00