@@ -476,19 +476,19 @@ def test_fields_for_order_statement_should_return_fields_according_user_format_s
476
476
assert_equal [ 'users.lastname' , 'users.firstname' , 'users.id' ] , User . fields_for_order_statement
477
477
end
478
478
end
479
-
479
+
480
480
def test_fields_for_order_statement_width_table_name_should_prepend_table_name
481
481
with_settings :user_format => 'lastname_firstname' do
482
482
assert_equal [ 'authors.lastname' , 'authors.firstname' , 'authors.id' ] , User . fields_for_order_statement ( 'authors' )
483
483
end
484
484
end
485
-
485
+
486
486
def test_fields_for_order_statement_with_blank_format_should_return_default
487
487
with_settings :user_format => '' do
488
488
assert_equal [ 'users.firstname' , 'users.lastname' , 'users.id' ] , User . fields_for_order_statement
489
489
end
490
490
end
491
-
491
+
492
492
def test_fields_for_order_statement_with_invalid_format_should_return_default
493
493
with_settings :user_format => 'foo' do
494
494
assert_equal [ 'users.firstname' , 'users.lastname' , 'users.id' ] , User . fields_for_order_statement
@@ -614,7 +614,7 @@ def test_try_to_login_with_locked_user_and_not_active_only_should_return_user
614
614
@auth_source . account_password = ''
615
615
@auth_source . save!
616
616
end
617
-
617
+
618
618
context "with a successful authentication" do
619
619
should "create a new user account if it doesn't exist" do
620
620
assert_difference ( 'User.count' ) do
@@ -623,7 +623,7 @@ def test_try_to_login_with_locked_user_and_not_active_only_should_return_user
623
623
end
624
624
end
625
625
end
626
-
626
+
627
627
context "with an unsuccessful authentication" do
628
628
should "return nil" do
629
629
assert_nil User . try_to_login ( 'example1' , '11111' )
0 commit comments