
Can't get TestCase to work
Reported by Jeff Wigal | April 27th, 2009 @ 08:56 PM
I'm having a heck of a time getting my tests working with Authlogic.
I put together a bare-bones rails app up and running, the only plugin I have installed is authlogic.
- user belongs_to :site
- site has_many :users
- account model only has a name:string attribute
I've tried the following variations:
- Rails 2.2.2, 2.3.2
- Session- and ActiveRecord-based session store
- Windows & Linux. My windows box has a very minimal gem setup (just blew it away and started from scratch last week, not related to this problem)
- within an application with about 12 different plugins and gems, and my app with no other gems/plugins
I'm requiring test_case in my test_helper.rb file
require 'authlogic/test_case'
Here's my integration test
require File.dirname(__FILE__) + '/../test_helper'
class LoginLogoutTest < ActionController::IntegrationTest
fixtures :all
setup :activate_authlogic
# Replace this with your real tests.
test "can login via post" do
get new_user_session_path
post_via_redirect user_session_path, :login => @user.login, :password => "awesomeness"
logger.info session.inspect
assert_response :success
get accounts_path
logger.info session.inspect
assert_response :success
end
test "can login via create" do
get new_user_session_path
UserSession.create!(@user)
logger.info session.inspect
get accounts_path
logger.info session.inspect
assert_response :success
end
def setup
site = Site.create!(:name => "booberry")
@user = User.create!(
:site => site,
:first_name => "john",
:last_name => "boy",
:login => "jeff",
:email => "jeff@wigaldesign.com",
:password => "awesomeness",
:password_confirmation => "awesomeness")
end
end
Plugin seems to work great in production/development mode using a browser. What am I missing?
Comments and changes to this ticket
-
123online November 9th, 2021 @ 11:39 PM
Therefore able to understand ameba slot completely Because some articles may contain specific terms and academic terms in the content. Accessible to all ages They are presented using words or texts to communicate well, making them want to read the content of ไทเกอร์สล็อต the article The author's comments were added as well.
-
yolo April 18th, 2022 @ 07:16 AM
2-2.5
Full casino, baccarat, slots, fish shooting games and other games -
wichit44214 April 28th, 2022 @ 06:46 AM
The best number 1 website in the country Complete convenience in online gambling services สล็อตแตกง่าย
-
-
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.