Sha256: 71b1d3cf29c51a905e713748db3f4c4d24f03bf5e7785a883f4e465218da05ef
Contents?: true
Size: 1 KB
Versions: 3
Compression:
Stored size: 1 KB
Contents
require 'test_helper' class UserSessionsControllerTest < ActionController::TestCase context "on GET for login screen" do setup do get :new end should_render_template :new end context "authentication" do setup do activate_authlogic @user = User.make end context "on GET for login by username" do setup do get :create, :user_session => { :username => @user.username, :password => @user.password } end should_set_the_flash_to I18n.t(:login_successful_flash) end context "on GET for login by email address" do setup do get :create, :user_session => { :username => @user.email, :password => @user.password } end should_set_the_flash_to I18n.t(:login_successful_flash) end context "on GET for login by email address not responding to any user" do setup do get :create, :user_session => { :username => @user.email, :password => '@@' } end should_render_template :new end end end
Version data entries
3 entries across 3 versions & 1 rubygems