Displaying 20 results from an estimated 1100 matches similar to: "Functional test problem with environments variables"
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)
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
2005 Jul 05
2
Salted hash login generator (verification problem?)
Hi all,
I hope someone can help with what is probably a simple newb
installation mistake on my part. I''m having a couple of problems with
the salted hash login generator. I installed it following the
quickstart guide, and the unit tests work like a charm. There are two
errors and a failure on the function tests, though; the verified field
seems to be involved in at least one of
2006 Aug 08
3
Database transactions
Hello,
I have an application where I need to create two records in a database
transaction.
ie:
begin
User.transaction(user) do
User_details.transaction(user_details) do
user.save
user_details.save
end
end
end
rescue
flash[:notice] "Insert rolled back... but why..??"
end
>From reading the Agile book, I gather that once I wrap the
2008 Mar 01
0
Fixtures in ActionController::TestCase
Hi guys,
Need some help.
I am using Rails 2.0 and while writing functional test, I encountered
the following problem
class UserControllerTest < ActionController::TestCase
fixtures :users
...
def do_something
attempt_login(users(:valid_user)) # assuming valid_user is a
proper line in
...
end
def attempt_login(user)
post :login, :user => { :login => user.login, :password
2007 Mar 22
1
Functional test and flash with an error
I''m getting this error thats moaning about expected tag, but no tag
found matching {:content=>"User James Apps was successfully created.",
:attributes=>{:id=>"notice"}, :tag=>"div"} in the file application.rb.
I tried using a regular expression - /#{user.first_name}/ , but that
wouldn''t work either
user_controller_test.rb
1) Failure:
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]
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.
2006 Sep 26
0
some help with functional testing of nested routes
I have the following functional test in test/functional for testing my
products_controller:
require File.dirname(__FILE__) + ''/../test_helper''
require ''products_controller''
# Re-raise errors caught by the controller.
class ProductsController
def rescue_action(e)
raise e
end
end
class ProductsControllerTest < Test::Unit::TestCase
fixtures
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 07
4
WEBrick wouldnt start....
hi guys, just did a search and cant find anything helpful..
suddenly my WEBrick cant start.... omg.... dunno wat''s wrong with it
that''s wat i typed :
......$ruby script/server
=> Booting WEBrick...
......$
that''s all... i dont even know wat''s wrong and when i did a ps -F -C
ruby, i also couldnt find anything.....
did i jsut corrupt the file or wat???
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 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
2006 Apr 18
7
Functional test, pls help!!!!
Hi guys, recently encountered this funny problem which i really dunno
wat happen...
I have been trying on it for the past few days and just doesnt work.Hope
you guys can give me some enlightenment.
Problem:
The functional test doesnt seems to be able to recognise one of my
model, and when i run the test, it keeps giving me the error of"You have
nil object when you don''t expect
2006 Jun 28
2
undefined method `use_transactional_fixtures=''
Folks,
I checked my test_helper.rb and it has
self.use_transactional_fixtures = true
My code was generated with 1.1.2 and I''m using 1.1.3 right now after
but the error persists.
I googled for this issue and it appears that a require is missing or
something like that. I can''t figure it out, please help!
/opt/local/bin/ruby -Ilib:test
2020 Sep 13
2
libva-utils test siuite is crashing in nouveau sriver
Hi,
I'm hitting that issue since Mesa 20.0.6 and it is present still in latest
version 20.1.7
```
[tkloczko at barrel SPECS]$ coredumpctl gdb 3926866
PID: 3926866 (test_va_api)
UID: 1000 (tkloczko)
GID: 1000 (tkloczko)
Signal: 11 (SEGV)
Timestamp: Sun 2020-09-13 18:57:06 BST (32s ago)
Command Line: ./test_va_api
Executable:
2011 Jul 05
4
Problem of "rake spec"
Hi all,
I am a bit confused when i type rake spec and it gives me this
message,
No examples matching ./spec/**/*_spec.rb could be found
what is that mean that something is not found.
and where i can input my the test code because i did have a tiny
sample code in user_controller_test.rb.
is that the right place to test functional..
plz give me a help
thanks
--
You received this message
2006 Apr 20
11
dynamic mock object anyone?
Hi guys, got this problem with creating such a thing... hope anyone
could help..
the problem:
ok, now i have this mock object that would simulate a external rpc call.
eg
require ''models/xmlrpc_agent''
class XmlrpcAgent
def create(params)
200
end
end
but the value of the value returned is fixed. which is quite hard for me
to test the controller when different
2006 Sep 15
3
Crashes and tests failures again with 0.10.4
In the beginning 0.10.4 looked promising, but now that my index has
grown to > 100 MB I''m getting segfaults on some searches again:
>> Post.find_by_contents(''rubyforum'')
# ok
>> Post.find_by_contents(''ruby-forum'')
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.10.4/lib/ferret/index.rb:351:
[BUG] Segmentation fault
ruby 1.8.4 (2005-12-24)
2006 Aug 02
1
REST and functional tests
Just playing around with converting an apps to the new REST goodness in
edge rails, and I''m trying to work out how to convert/write the
functional tests.
Is the recommended way to explicitly use the actions (e.g. get :show,
:id => ...; post :create,..., etc) and test the routes separately, or
duplicate the request, in which case how is that done get "/", :id => 5