require "test_helper"
class UserLoginTest < ActionDispatch::IntegrationTest
- fixtures :users, :user_blocks
+ fixtures :users
def setup
OmniAuth.config.test_mode = true
def test_login_email_password_blocked
user = users(:blocked_user)
+ create(:user_block, :needs_view, :user => user)
try_password_login user.email, "test"
def test_login_email_password_blocked_upcase
user = users(:blocked_user)
+ create(:user_block, :needs_view, :user => user)
try_password_login user.email.upcase, "test"
def test_login_email_password_blocked_titlecase
user = users(:blocked_user)
+ create(:user_block, :needs_view, :user => user)
try_password_login user.email.titlecase, "test"
def test_login_username_password_blocked
user = users(:blocked_user)
+ create(:user_block, :needs_view, :user => user)
try_password_login user.display_name.upcase, "test"
def test_login_username_password_blocked_upcase
user = users(:blocked_user)
+ create(:user_block, :needs_view, :user => user)
try_password_login user.display_name, "test"
def test_login_username_password_blocked_titlecase
user = users(:blocked_user)
+ create(:user_block, :needs_view, :user => user)
try_password_login user.display_name.titlecase, "test"