similar to: What is this failure trying to tell me?

Displaying 20 results from an estimated 2000 matches similar to: "What is this failure trying to tell me?"

2005 May 18
10
Salted Login Generator issues
Hello all, I''ve just installed and begun to integrate the salted login generator. So far I''m very impressed, though I''ve hit a few snags along the way. Unfortunately, I''ve met the first one that I haven''t been able to resolve on my own. When I hit the login action, I get errors in my log files. The specific error with trace is included below.
2005 Dec 23
1
Salted Login Error
Anyone know what''s causing this? ------------------------------------------------------------------------ 1) Error: test_delete(UserControllerTest): NoMethodError: undefined method `advance_by_days='' for Time:Class ./test/functional/user_controller_test.rb:132:in `test_delete'' 2) Error: test_signup(UserControllerTest): NoMethodError: undefined method
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 Oct 21
6
test_create gets 200 instead of :success
Help! I have a new/create process that works fine in the actual app. But when I test I always get a failure in the test_create section. Here''s some controller code: def new end def create begin @borrower = Borrower.new(params[:borrower]) if @borrower.save flash[:notice] = ''Borrower '' + @borrower.FirstName + '' '' +
2009 Apr 21
2
validates_uniqueness_of
hello all, i am new to RoR programming and am struck with the functional test whole checking for uniqeness of carriers. If it is not unique,the the bin shudn''t be created.Can someone help me in correcting my code. def test_create_failure_cycle_unique begin num_bins = Bin.count post :create, {:bin => { :carrier => carriers(:A), :cycle => cycles(:one), :name =>
2006 May 03
0
Accessing the params hash in a functional test not working
I am having problems reading params in a functional test (Rails 1.1.2). My test looks like this: fixtures :users def test_auth_bob @request.session[:return_to] = "/bogus/location" post :login, :user => { :email => "bob@example.com", :password => "test" } assert_session_has :user assert_equal @bob, @response.session[:user]
2007 Jul 30
6
Object.stubs doesn''t seem to work.
Hi I''m using Mocha 0.5.3 and I want to stub out a call to Time.now, just like the example in the post http://blog.floehopper.org/articles/2007/06/08/mocha-0-5-released However, trying it in irb gets me the following error: >> require ''mocha'' => true >> Time.stubs(:now).returns(Time.parse(''Thu Feb 01 00:00:00 UTC 2007'')) NoMethodError:
2006 Jul 06
6
Functional tsts
Hi all, I have created projects module in my application using scaffold, and it created me everything, and all the modules are working except the functional test. This is the error 1) Failure: test_create(ProjectsControllerTest) [test/functional/projects_controller_test.rb :55]: Expected response to be a <:redirect>, but was <200> 8 tests, 25 assertions, 1 failures, 0
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
2005 Dec 14
1
Problems with testing - error posting to other controller
Hi, I''m trying to test my ad_controller. In order to create an ad, the user has to be logged in, so I have written a login() that logs in a valid user and generates a session[:user_id], like: def login (login="bob", password="atest") post "user/login", :user => { :login => login, :password => password } assert_response 302 # redirect
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 Feb 27
1
Functional test problem with environments variables
Hi guys, i have been experiencing this problem once i put in some constant declarations in /config/environments/development.rb. I declared it very normally like this : USER_DETAILS = { :name => ''abc'', :password => ''123''} it works in the controller and when i run the application, i managed to get the values out from the development.rb by using some
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 May 18
0
[PATCH server] fixed functional tests after recent controller refactoring and managed node controller fixes.
Signed-off-by: Scott Seago <sseago at redhat.com> --- src/test/functional/host_controller_test.rb | 41 -------------------- .../functional/managed_node_configuration_test.rb | 14 ++++--- src/test/functional/nic_controller_test.rb | 8 ---- src/test/functional/permission_controller_test.rb | 15 ++++--- src/test/functional/quota_controller_test.rb | 2 +-
2009 Jun 29
2
One more fix
This resend includes the rebase, but fixes a problem I just noticed with nil/empty checks.
2009 Jun 29
2
Resend of Cloud UI/service patches
This is a resend of the 2-patch series from a week or so ago, needed to be rebased due to some commits on next
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
2009 Jun 22
2
Patch series for Cloud Vm Actions
The following two patches should be applied in the order: * [PATCH server] Add svc_vm_actions method to VmService. * [PATCH server] Cloud UI layer to initiate actions on vms. The service layer patch should work fine on its own (and not break anything), but cloud patch relies on service being there.
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''
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