Hi,

I follow the tutorial of testing the params  then i got the error when
i test..
can someone help me


Thanks for your help


Yennie

code
 def disable
    if !(@user = User.find_by_id(params[:id]))
      render :action => "common/error_notfound"
    else
      @user.save
      @users = User.find(:all)
      redirect_to( {:action=>"index"}
    end
  end

test
    it "should not go to index" do
        get :index, :user => {:email => "testing",
                      :password => "12345",
                      :name => "you"}
        assigns[:user].name.should == "you"
        response.should redirect_to('index')
    end

error
       undefined method `name' for nil:NilClass


-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to