similar to: Strange behaviour from assert_redirected_to

Displaying 20 results from an estimated 700 matches similar to: "Strange behaviour from assert_redirected_to"

2006 Aug 24
10
MongrelCluster - How can I make a request to a specific mongrel instance?
In our app we''ve a number of singleton ruby classes that cache static data in hashes, things like string values, system config params, etc). In a webbrick environment this works ok, but we find in production we have a problem because we have 4 caches, one for each mongrel instance. This also isn''t a BIG problem, but our cache.reload() methods are kinda useless now, because we
2010 Feb 19
2
Problem with assert_redirected_to
I have taken over some old Rails code and am trying to get the tests to run. In the functional test every time the assertion ''assert_redirected_to'' is called I get the following error: test_should_update_venue(VenuesControllerTest): NoMethodError: undefined method `[]'' for #<Enumerable::Enumerator:0x102f747e0>
2006 Dec 11
1
assert_redirected_to error
I''m new to TDD in rails, I''m getting this weird error with assert_redirected_to. Here''s my test: def test_friendship_request_accept @request.session[:user] = users(:nathan).id get :accept, { :id => 1 } assert_redirected_to :controller => "/users/profile", :action => "index", :id => users(:nathan).id end When I run this I
2010 Apr 29
1
How can I integrate change_password plugin, dovecot and postfix
Hello I use dovecot, postfix, mysql and squirrelmail as a mail server. it works well. Meanwhile I am novice at postfix. As you know, there is a change_password plugin on squirrelmail. I wish to add change_password plugin on squirrelmail. I couldn't find how to integrate postfix and change_password. How can I add it ?
2010 Apr 29
1
How can I add change_password
Hello I use dovecot, postfix, mysql and squirrelmail as a mail server. it works well. Meanwhile I am novice at postfix. As you know, there is a change_password plugin on squirrelmail. I wish to add change_password plugin on squirrelmail. I couldn't find how to integrate postfix and change_password. How can I add it ?
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 Feb 20
1
link_to weirdness, related to namespace?
Hi, In my app/views/admin/clieint/_searchresults.rhtml partial, I have ... <% for user in @users %> <tr> <td><%=h user.ship_to_first_name %></td> <td><%=h user.ship_to_last_name %></td> <td><%=h user.email %></td> <td align="center"><%= link_to ''Show'', {:action =>
2004 Feb 24
2
win32-etc cvs
Hi all, I''ve got the beginning of win32-etc 0.2.0 checked into cvs. This includes a new sub-module called Admin that includes the add_user, delete_user, and change_password methods. I eventually will add a config_user method as well, plus whatever else I feel like tossing in. :) One issue I''m having is with the change_password - no matter what I try, I always get
2008 Feb 27
7
older version of rails -- Unknown action error
Hi, I''m using Rails 1.2.3 (constraint of the hosting company). I''m getting this error Unknown action No action responded to subscriber upon visiting http://mydomain.com/super_admin/subscriber/search I have these files: app/controllers/super_admin_controller.rb app/controllers/super_admin/subscriber_controller.rb app/views/super_admin/subscriber/search.rhtml and below is my
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 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 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
2005 Oct 14
7
validates_confirmation_of not working
Hello, I''m having a weird problem in my user model. For the change_password method I have the following: def change_password(oldpass, newpass, confirmation) oldpass = self.class.myhash(oldpass) reload passhash = self.password self.password = newpass self.password_confirmation = confirmation if valid? and oldpass == passhash save! else # valid?
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:
2004 Mar 05
1
win32-etc change_password
Hi all, I''ve been updating this thing and, on my Windows XP Pro box, the Admin.change_password method doesn''t seem to work. I keep getting "user not found" errors, even though I can see that the user is definitely in place. In fact, it doesn''t seem to work for the 0.2.0 release, even though I could swear I had it working. Also, is it possible to change the
2006 Jul 02
5
"the number of parameters does not match the number of substitutions" error
All of a sudden, I''m getting this error: 1) Error: test_index(AccountControllerTest): RuntimeError: The number of parameters does not match the number of substitutions. /home/joe/projects/tanga/trunk/config/../vendor/rails/actionpack/lib/action_controller/assertions.rb:92:in `assert_redirected_to''
2007 Dec 24
1
Uninitialized constant in integration test
I am seeing weird issues when trying to create integration tests. Here is a very simple example of something that is failing. The assert_redirected_to, and other methods, fail with this or similar exceptions. I have tried requiring both ''application'' and ''listings_controller'', but neither solves this problem, although the exception changes. Anybody know
2007 Oct 01
3
stringify_keys!
I have seen this numerious times and still have no idea what it means: undefined method `stringify_keys!'' for "blah22":String I am tring to change a password. My code looks like: def change_password @user = User.find_by_emailaddr( params[:email] ) if @user.nil? # user profile not created flash[:notice] = "<b style = \"color:red\">No such