Displaying 1 result from an estimated 1 matches for "sessionmethods".
2006 Jul 08
0
Testing cookies - integration tests
...testing cookies is supported via
integration tests or not. Anybody have any idea if it is supported and
what I may be doing wrong?
Here''s basically what I''m trying to test...
# start a new session and login (sets a cookie value)
open_session do |sess|
sess.extend SessionMethods
sess.login_user :remember => true
sess.get url_for(:controller => ''main'')
sess.assert_equal sess.assigns(:user).id.to_s,
sess.assigns(:cookies)[''login''].first
end
# start a new session, cookie should still be set
open_session...