Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | escape assigns[:person], assigns[person] etc in actioncontroller testcase | Nick Howard | 2011-12-14 | 1 | -3/+3 |
| | |||||
* | Fix bug in assert_template when using only `:layout` option | Prem Sichanugrist | 2011-12-06 | 1 | -13/+15 |
| | | | | | | | | | | Currently if you're do this: assert_template :layout => "foo" Regardless of what layout you were using, the test will always pass. This was broken since the introduction of :layout option in [d9375f3f]. We have a lot of test cases in actionpack/test/controller/layout_test.rb that use this feature. This will make sure that those test cases are not true negative. | ||||
* | Merge pull request #3193 from avakhov/patch-ac-test-case-safe-constantize | José Valim | 2011-10-03 | 1 | -3/+1 |
|\ | | | | | use safe_constantize instead constantize in AC::TestCase | ||||
| * | use safe_constantize instead constantize in AC::TestCase | Alexey Vakhov | 2011-10-03 | 1 | -3/+1 |
| | | |||||
* | | normalize arg for AC::TestCase tests class method | Alexey Vakhov | 2011-10-03 | 1 | -2/+14 |
|/ | |||||
* | if ... nil? is more expensive than unless | Milan Dobrota | 2011-09-04 | 1 | -3/+3 |
| | |||||
* | Make ActionController::TestCase#recycle! set @protocol to nil | David Majda | 2011-08-23 | 1 | -1/+1 |
| | | | | | | | | | | This ensures that the protocol does not get carried over when there are two or more requests in functional tests. This was a problem when e.g. the first request was HTTP and the second request was HTTPS. Closes #2654. Signed-off-by: Andrew White <andyw@pixeltrix.co.uk> | ||||
* | Don't modify params in place - fixes #2624 | Andrew White | 2011-08-23 | 1 | -5/+3 |
| | |||||
* | Fix the issue where default_url_options is being cached on test cases. ↵ | thoefer | 2011-08-01 | 1 | -0/+1 |
| | | | | | | Closes #1872. Closes #2031. Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Call super here to allow SessionHash initialize new stuff for us | Santiago Pastorino | 2011-06-19 | 1 | -1/+1 |
| | |||||
* | Add backward compatibility for testing cookies | Andrew White | 2011-06-05 | 1 | -1/+8 |
| | | | | | | | | | | | | | | | | | | | 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. | ||||
* | Refactor ActionController::TestCase cookies | Andrew White | 2011-06-04 | 1 | -13/+8 |
| | | | | | | | | | | | | | | | | | | 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. | ||||
* | Merge pull request #1203 from dchelimsky/stringify-parameter-values-in-tests | José Valim | 2011-05-28 | 1 | -0/+19 |
|\ | | | | | Stringify param values in controller tests. | ||||
| * | use to_param (and change method to name accordingly) | David Chelimsky | 2011-05-22 | 1 | -8/+8 |
| | | | | | | | | | | - exclude Rack::Test::UploadedFile to pass existing tests. Are there any other types we're missing? | ||||
| * | Stringify param values in controller tests. | David Chelimsky | 2011-05-22 | 1 | -0/+19 |
| | | | | | | | | | | | | | | | | This reduces false positives that come from using ints in params in tests, which do not get converted to strings in the tests. In implementations going through rack, they do get converted to strings. - David Chelimsky and Sam Umbach | ||||
* | | Replace references to ActiveSupport::SecureRandom with just SecureRandom, ↵ | Jon Leighton | 2011-05-23 | 1 | -1/+1 |
|/ | | | | and require 'securerandom' from the stdlib when active support is required. | ||||
* | Use anonymous? that works on both Ruby 1.8 and 1.9. | José Valim | 2011-05-17 | 1 | -3/+4 |
| | |||||
* | add more robust test for wrapping params with anonymous class | David Chelimsky | 2011-05-17 | 1 | -1/+5 |
| | |||||
* | prevent errors when passing a frozen string as a param to ↵ | misfo | 2011-04-28 | 1 | -1/+3 |
| | | | | | | | ActionController::TestCase#process since ActionDispatch::Http::Parameters#encode_params will force encoding on all params strings (when using an encoding aware Ruby), dup all strings passed into process. This prevents modification of params passed in and, more importantly, doesn't barf when a frozen string is passed thanks and high fives to kinsteronline | ||||
* | Improve testing of cookies in functional tests: | Andrew White | 2011-03-06 | 1 | -1/+10 |
| | | | | | | | | | - cookies can be set using string or symbol keys - cookies are preserved across calls to get, post, etc. - cookie names and values are escaped - cookies can be cleared using @request.cookies.clear [#6272 state:resolved] | ||||
* | class inheritable attributes is used no more! all internal use of class ↵ | Josh Kalderimis | 2010-11-20 | 1 | -2/+4 |
| | | | | | | inheritable has been changed to class_attribute. class inheritable attributes has been deprecated. Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Move @assigns from the controller to the test itself | Santiago Pastorino | 2010-11-06 | 1 | -0/+1 |
| | |||||
* | Fix problems trying to functional test AC::Metal controllers | Santiago Pastorino | 2010-11-06 | 1 | -2/+2 |
| | | | | [#5393 state:committed] | ||||
* | Reset assert_template instance variables between requests [#5832 state:resolved] | Andrew White | 2010-10-18 | 1 | -0/+7 |
| | |||||
* | Solve some warnings and a failing test. | José Valim | 2010-10-03 | 1 | -0/+1 |
| | |||||
* | Rely on Rack::Session stores API for more compatibility across the Ruby world. | José Valim | 2010-10-03 | 1 | -3/+5 |
| | |||||
* | no need of nil check | Neeraj Singh | 2010-09-30 | 1 | -1/+1 |
| | |||||
* | Remove more warnings: no need to define attr_accessor if already exists. ↵ | Emilio Tagua | 2010-09-28 | 1 | -3/+5 |
| | | | | Initialize ivar. | ||||
* | Remove warning "URI.unescape is obsolete" from actionpack. | Emilio Tagua | 2010-09-27 | 1 | -4/+0 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Avoid uninitialized variable warning. | Emilio Tagua | 2010-09-27 | 1 | -1/+1 |
| | |||||
* | Remove warning "URI.unescape is obsolete" from actionpack. | Emilio Tagua | 2010-09-27 | 1 | -1/+5 |
| | |||||
* | Remove deprecated stuff in ActionController | Carlos Antonio da Silva | 2010-09-26 | 1 | -1/+1 |
| | | | | | | This removes all deprecated classes in ActionController related to Routing, Abstract Request/Response and Integration/IntegrationTest. All tests and docs were changed to ActionDispatch instead of ActionController. | ||||
* | escape constant names | Joost Baaij | 2010-08-26 | 1 | -4/+4 |
| | |||||
* | Reset symbolized path parameters when a test request is recycled [#5437 ↵ | Andrew White | 2010-08-24 | 1 | -0/+1 |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -1/+1 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | Change returning with tap | Santiago Pastorino | 2010-07-25 | 1 | -1/+1 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Sessions should not be created until written to and session data should be ↵ | Michael Lovitt | 2010-06-23 | 1 | -0/+2 |
| | | | | | | | | destroyed on reset. [#4938] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Add support for specifying locals in view tests with assert template [#4927 ↵ | David Chelimsky | 2010-06-22 | 1 | -3/+13 |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Fix a bunch of minor spelling mistakes | Evgeniy Dolzhenko | 2010-06-11 | 1 | -2/+2 |
| | |||||
* | Reset request.parameters after assigning params for functional tests | Jeremy Kemper | 2010-06-06 | 1 | -2/+4 |
| | |||||
* | Memoizing methods on request means we need to clear them out on recycle! | wycats | 2010-06-04 | 1 | -3/+3 |
| | |||||
* | Eliminate false positives when passing symbols to assert_template | David Chelimsky | 2010-05-03 | 1 | -1/+2 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Change event namespace ordering to most-significant first [#4504 state:resolved] | Justin George | 2010-05-02 | 1 | -4/+4 |
| | | | | | | | | | More work still needs to be done on some of these names (render_template.action_view and render_template!.action_view particularly) but this allows (for example) /^sql/ to subscribe to all the various ORMs without further modification Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | extract ActionController::TestCase::Behavior | David Chelimsky | 2010-04-26 | 1 | -126/+133 |
| | | | | | | | | | | - this makes it possible for other test frameworks to hook into testing facilities provided by Rails without having to subclass AC::TestCase. [#4474 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | allow unsubscribe by name or subscription [#4433 state:resolved] | David Chelimsky | 2010-04-24 | 1 | -0/+1 |
| | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fix missing dependency on Hash#to_query | Santiago Pastorino | 2010-04-14 | 1 | -0/+1 |
| | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Add accessors for request and response so tests don't have to mess with ↵ | Michael Koziarski | 2010-04-09 | 1 | -0/+2 |
| | | | | internal ivars | ||||
* | Consistent routing language | Joshua Peek | 2010-03-30 | 1 | -5/+5 |
| | |||||
* | adds missing requires for Object#blank? and Object#present? | Xavier Noria | 2010-03-28 | 1 | -0/+1 |
| | |||||
* | Get modules back into integration tests | Carlhuda | 2010-03-17 | 1 | -1/+0 |
| |