A few tweaks to get tests running

This commit is contained in:
Eric Allen 2009-12-07 18:29:57 -05:00
parent ac0ff3feaf
commit 6181d42072
3 changed files with 4 additions and 4 deletions

View file

@ -24,7 +24,7 @@ config.action_controller.allow_forgery_protection = false
# See http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/5519ca7fd4dde3c1
class ActionController::RackRequest
DEFAULT_SESSION_OPTIONS = {
:database_manager => CGI::Session::MemoryStore, # store data in memory
#:database_manager => CGI::Session::MemoryStore, # store data in memory
:prefix => "ruby_sess.", # prefix session file names
:session_path => "/", # available to all paths in app
:session_key => "_session_id",

View file

@ -110,7 +110,7 @@ class LoginControllerTest < ActionController::TestCase
def test_should_fail_cookie_login
users(:other_user).remember_me
@request.cookies["auth_token"] = CGI::Cookie.new('name' => 'auth_token', 'value' => 'invalid_auth_token')
@request.cookies["auth_token"] = 'invalid_auth_token'
get :login
assert !@controller.send(:logged_in?)
end
@ -139,7 +139,7 @@ class LoginControllerTest < ActionController::TestCase
private
def auth_token_cookie_for(user)
CGI::Cookie.new('name' => 'auth_token', 'value' => users(user).remember_token)
users(user).remember_token
end

View file

@ -1,6 +1,6 @@
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require File.expand_path(File.dirname(__FILE__) + "/../app/controllers/application")
require File.expand_path(File.dirname(__FILE__) + "/../app/controllers/application_controller")
require 'test_help'
require 'flexmock/test_unit' #and the flexmock gem, too!
require 'action_web_service/test_invoke'