Displaying 20 results from an estimated 8000 matches similar to: "Test redirect_to fails"
2006 Jun 17
3
What is this failure trying to tell me?
Here is my unit test code.
    post :login, :user=>{ :login => "bob", :password => "test"}
    assert_response :redirect
    assert_session_has :user
    assert_redirected_to :action => ''welcome''
Here is the failure I''m getting when I run my tests.
  2) Failure:
test_login_required(UserControllerTest) 
2006 Jun 30
4
Strange behaviour from assert_redirected_to
I have this assertion in my tests:
assert_redirected_to :controller => ''user'', :action => ''change_password''
It fails with:
response is not a redirection to all of the options supplied
(redirection is <"http://test.host/user/change_password">),
difference: <{:controller=>"user"}>
The redirection was:
redirect_to
2006 Mar 22
0
assert_redirected_to behaviour
Consider following situation: you''ve got controller Foo that has 
following routing rules related:
map.connect ''/foo'', :controller => ''foo'', :action => ''index''
map.foo ''/foo/:x/:y/:z/:action'', :controller => ''foo''
You want all Foo actions to make use of partial url rewriting, so 
instead
2006 Aug 03
2
Failing test with assert_redirected_to
I''m having a strange problem with an assert_redirected_to in my 
controller test which hopefully someone can point out my failings with! 
;)
Controller method -
def new
  if request.post?
    #Not important here.
  else
    flash[:notice] = ''Please join a tree from this page.''
    redirect_to :controller => ''trees'', :action =>
2010 Aug 16
0
assert_redirected_to partial assertion does not work?
Hi,
From the docs I see:
http://api.rubyonrails.org/classes/ActionController/Assertions/ResponseAssertions.html
This match can be partial, such that assert_redirected_to(:controller =>
"weblog") will also match the redirection of redirect_to(:controller =>
"weblog", :action => "show") and so on
But it my case it does not work. As
2007 Jan 21
0
Functional Test Fails with before filter in application.rb
Hi There,
I am trying to write my first tests for a role bassed authentication
taken from Rails Recipies. Whenever I add:
assert_redirected_to :action => ''login''
I get the following error:
NoMethodError: undefined method `first'' for :user:Symbol
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/assertions/response_assertions.rb:72:in
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
Hi,
I just installed Rails 2.0.2
[root@mymachine easyx]# ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]
[root@mymachine easyrx]# gem install rails --include-dependencies
Need to update 16 gems from http://gems.rubyforge.org
................
complete
Successfully installed rails-2.0.2
[root@remandev easyrx]#
But I''m getting this error in my restful_authentication
2006 Jul 11
0
assert_redirected_to not recognizing routes
I''m getting a weird error in a call to assert_redirected_to in one of
my functional tests.  Here is the test:
  def test_signin
    admin = users(:adminuser)
    post :signin, {:login => admin.email, :realpass => @password}
    assert_redirected_to :action => ''list''  # failure happens on this line
    assert_equal admin.id, session[:user].id
  end
The error
2006 May 23
4
Version 0.80 of Prototype Window Class
Hi
I have just posted a new release of  my Prototype Window Class  
(http://blogus.xilinus.com/pages/javawin)
Seb
2007 Jul 26
6
response.should_not redirect_to
Hey,
May be it is just too deep night over here and I''m missing something  
though I got this failure on {{{response.should_not redirect_to}}}:
''QueuesController should allow authenticated user to access ''show''''  
FAILED
Matcher does not support should_not.
See Spec::Matchers for more information
about matchers.
Also I''ve found this in
2006 Mar 29
6
Prototype Window Class 0.6
Hi
I have just released a new version of my Prototype Window Class  
included modal windows and a lot of stuff that some people send me,  
thanks to all of you guys for your support.
Seb
2005 Mar 06
3
question about testing
Ok, so now I''m learning about testing. After a few initial hiccups,
I''ve got my tests written nicely and all the assertions are passing.
But I just have one question about doing tests in a loop.
In my setup, I''m using the login generator to protect ''sensitive''
actions, while some actions are public. So I''ve got this line in my
setup method:
2009 Oct 28
1
Authlogic Page View Authentication Help
Hi:
I am a newbie at ROR, and I am grasping my head around Authlogic. I am
having hard time trying to figure out how can I do the following:
in my application controller I have the following helpers:
filter_parameter_logging :password, :password confirmattion
helper_method :all
    private
      def current_user_session
        return @current_user_session if defined?
(@current_user_session)
2006 Sep 05
1
Prototype-Carousel 0.1
Hi
I have done a light implementation of the YUI Carousel
Feel free to try or use it
http://prototype-carousel.xilinus.com/
Seb
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To
2007 Aug 21
2
using restful_authentication current_user inside controller specs
I''m using restful_authentication in my app and I have  the before filters in
my application rhtml:
before_filter :login_required
around_filter :set_timezone
around_filter :catch_errors
Currently I have them commented out while rspec''in but I''ll need to add them
in my specs.
  def create
    @ticket = Ticket.new(params[:ticket])
    @ticket.user = current_user
    if
2006 Mar 25
1
Prototype Window Class v0.5
Hi,
I have developed a Window class in Javascript based on prototype  
library. It allows you to have resizable window in your web page. You  
can change easily the look and feel and use script.aculo.us effects  
to show and hide windows.
Download, documentation and samples are here: http:// 
blogus.xilinus.com/pages/javawin
Feel free to use it.
Thanks
Seb
2007 Jul 01
3
Session WTF ?
Hi.
How to use session in ruby on rails ?
I try to make it work for hours, but it still doesn''t work...
In my controller I have this:
  def identification
    @current_user = User.new(params[:user])
    ok = false
    redir = ''login_failed''
    @remote_user = User.find(:all)
    @remote_user.each do |r_user|
      if (r_user.login == @current_user.login and
         
2007 Jan 09
1
assert_redirected_to not working as expected
I''ve installed the "acts_as_authenticated" plugin and made some
modifications to the controller (app/controllers/account_controller.rb)
"signup" module as follows:
===
  def signup
    @page_title = ''Create Account''
    @user = User.new(@params[:user])
    if request.post?
      if @user.save
        session[:user] = User.authenticate(@user.login,
2008 Aug 30
3
Working with sessions in beast forum
Hey,
I''m designing an app which displays the events near a user in RoR. I''m
using the beat forum to facilitate user management/sessions/etc. I''ve
edited the sessions table in the Beast database to contain a
"session_location" value and what I''d like to do is to set this to the
users location when they log in. This would allow them to change their
2006 May 10
0
Ezra''s acl_system2 and flash not getting populated in functional tests
Hi all,
I am using the LoginGenerator and Ezra''s acl_system2 to protect  
certain actions in my controllers. I have written some functional  
tests to check for correct handling of redirects, flashes, etc. The  
flashes however only get populated on the first get action in any  
given test. Here is what I have so far:
In the controller:
class PageController < AC
   before_filter