similar to: Functional Tests when using the User Engine

Displaying 20 results from an estimated 40000 matches similar to: "Functional Tests when using the User Engine"

2007 Nov 28
2
follow_redirect!() doesn't exist?
Hi all I want to do some functional testing. I stumbled over the method follow_redirect!() somewhere, but evidently this doesn''t seem to exist in my Rails version (1.2.5 or so)?! Then I tried follow_redirect() (without the exclamation mark), and I get the following error: TypeError: can''t convert Symbol into String What am I doing wrong? Thanks for help :-) Josh -- Posted via
2006 Apr 03
0
follow_redirect! aborts rake during integration tests
I''m running integration tests on Rails 1.1/Ruby 1.8.4/Windows XP and have found that any call to follow_redirect! (directly or through [get|post]_via_redirect) causes rake to abort (see command line output below). Has anyone else seen this error, or know what might be the trouble? Thanks! Tom C:\dev\h2h>rake test:integration --trace (in C:/dev/h2h) ** Invoke test:integration
2006 Apr 04
1
integration tests - 1.1
I?m using the new 1.1 integration test facility? I?m trying to write a test that sees if a controller redirects to the correct place and preserves the query string. Here?s the code: class LoginRedirectTest < ActionController::IntegrationTest def test_non_admin_auth request_uri = "/datafeed/event/report?blah=blah" get(request_uri) follow_redirect!
2007 Jul 25
3
autotest + integration testing (follow_redirect!) error
I''ve got an interesting (possibly) problem right now between autotest and rails integration tests. There are a few things to preface this with. Works fine: rake test rake test:integration Blows up: autotest Autotest is correctly determining rails and runs tests just fine. One part of the behavior is that if I save a change in just the integration test (even hitting cmd+s to trigger a
2006 Jul 03
2
Login Engine & Functional Tests
Hello, I''m creating some functional tests form my controler, and most actions require login. I''m using login engine to manage the login functionalities. I would like to know how can I login a user in a functional test. This is, the first thing that I would like to do is to login a user. This way the response will return :success instead of :redirect. Thanks in advance. --
2006 Sep 03
1
Returning different values with stubs
Right now I''m working on adding tests to a method that looks like this: def get_via_redirect(path, args={}) get path, args follow_redirect! while redirect? status end So, I want to confirm that get is called and that status is returned but I also want to see that when the value of redirect? effects how many times follow_redirect is called. Is there
2014 Mar 31
0
Rails Engine ActionController::UrlGenerationError on functional tests
Hi, I'm looking for a way to solve an error I get each times I run my functional tests. I have a Rails Engine gem (isolated), I have a JSON action with a route declared. But each times I use the method get in a test I get an ActionController::UrlGenerationError exception. Here an example of code with the problem: # config/routes.rbMyEngine::Engine.routes.draw do resources :cats, only:
2006 Jun 30
0
Functional Tests and Login Engine
Hello, I''m creating some unit test to my controler, and most actions require login. I''m using login engine to manage the login functionalities. I would like to know how can I login a user in a functional test. This is, the first thing that I would like to do is to login a user. This way the response will return :success instead of :redirect. Thanks in advance. -- Posted
2007 Mar 12
1
Can't follow redirects outside current controller - but it's the same controller
Running a functional test on FooController that does ''follow_redirect'', I get ''Can''t follow redirects outside current controller (from "foo" to "foo"). On further investigation, it turns out that :foo != ''foo'' around line 401 of actionpack/lib/ action_controller/test_process.rb. Changing the line: if redirected_controller
2005 Dec 23
6
Agile book - test error
Hi all, I get an error when testing the "store_controller_test.rb" The troublesome line is in the test below: def test_add_to_cart get :add_to_cart, :id => @version_control_book.id <<< cart = session[:cart] assert_equal @version_control_book.price, cart.total_price assert_redirected_to :action => ''display_cart'' follow_redirect
2006 Jun 07
2
Confirm User engine clobbers active web service actions
Hello Ive been learning / implementing AWS Thanks to the wonderful pdf by orielly I was able to spot a problem with the User Engine I would like to see if anyone else has had problems with this?? Basically if you make a web service at /products You should be able to reach /product/wsdl and get a well formatted xml doc If you have a login engine on it seems
2006 Jul 17
5
Functional Tests misbehaving with Globalize
Howdy all Apologies to the folks subscribed to the globalize list for dual posting this message... I''ve got a project running globalize and rails 1.1.4, and I''ve only recently adopted a strong love for testing. Now my models are 100% tested (I must note that I do not make use of any translations in the database yet), and I''ve now started with functional tests before
2006 Jun 06
5
Functional tests and protected actions
Hello! I have certain methods in my Application Controller, that I need to access. Namely ApplicationController#logged_in_user The problem is, that when I try to access it, I get: NoMethodError: protected method `logged_in_user'' called for #<AdminController> Any ideas how I can circumvent that? Or are functional tests really not suited for any kind of logins and session work?
2006 Feb 17
0
: Indexed Search Engine 0.2.0 Released
The 0.2.0 release of the Indexed Search Engine<http://lance.langwell-ball.com/pages/indexed-search>is released. The Indexed Search Engine is a Ruby on Rails Engine <http://rails-engines.org> which helps you to easily add quick indexing and search capabilities to your application. Check out the project page<http://lance.langwell-ball.com/pages/indexed-search>for more info.-- --
2006 Jul 03
0
Is opinion available as gem or engine ?
Hi Is Opinion available as a gem or engine for download? I am confused with the 8-9 folders that are available on SVN. Thanks for the tip for Share session between sub domains :) Cheers =R _________________________________________________________________ Express yourself: design your homepage the way you want it with Live.com. http://www.live.com/getstarted -------------- next part
2006 Aug 10
0
quickk fix for engine on dreamhost with 1.1.5
HI all this is a quick fix to get you rails app running on dreamhost if engines has stopped since the 1.1.5 upgrade comment out line 6 and 7 in vendor\plugins\engines\lib\engines\engines.rb as the require ''rails_version'' will give you an error like /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'': no such file to load -- rails_version
2006 May 14
0
login engine -- no such file to load -- authenticated_user
Ive followed the rail engines doc to the letter and I get this error message It is in the proper direcotry vendor/plugins/login_engine/lib/login_engine What could be wrong?? Clayton Cottingham WinterMarket Networks Phone: (604) 417-3254 Vancouver, B.C. Canada http://www.wintermarket.net MSN:drfrog666@hotmail.com AIM:drfrogrx -------------- next part -------------- An
2005 Dec 17
4
user engine: Role.count() is zero in tests
Subject pretty much says it all. When user_engine#check_system_roles is called, it discovers that Role.count is zero. However using script/console to execute the same query reveals three users. N.b., this does not happen in the actual application; only when running tests. Any help is appreciated. Thx -- Posted via http://www.ruby-forum.com/.
2006 May 07
0
NoMethodError trying to get ApplicationHelper method from a functional test
I am a little confused by the includes I suspect. In the book, it states that runtime environment will load the directories app, app/models, app/controllers, app/helpers, app/apis, components, config, lib, vendor and vendor/rails/*. However, when I try to access my "current_project" public method, it fails with a NoMethodError. What is even stranger is that I can use reflection to find
2008 May 08
0
New test helpers
Hey guys- A few methods useful for testing have been added to trunk: 1) facebook_post For use in controller unit tests and integration tests. Basically, it delegates to the standard "post" method for simulating post requests in a test, but constructs mock fb_sig params and passes them along to the requested action with the rest of the params that the test specifies. 2)