remove trailing white-spaces from test/unit/user_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12224 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3172359f97
commit
4eea64d38f
|
@ -476,19 +476,19 @@ class UserTest < ActiveSupport::TestCase
|
||||||
assert_equal ['users.lastname', 'users.firstname', 'users.id'], User.fields_for_order_statement
|
assert_equal ['users.lastname', 'users.firstname', 'users.id'], User.fields_for_order_statement
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_fields_for_order_statement_width_table_name_should_prepend_table_name
|
def test_fields_for_order_statement_width_table_name_should_prepend_table_name
|
||||||
with_settings :user_format => 'lastname_firstname' do
|
with_settings :user_format => 'lastname_firstname' do
|
||||||
assert_equal ['authors.lastname', 'authors.firstname', 'authors.id'], User.fields_for_order_statement('authors')
|
assert_equal ['authors.lastname', 'authors.firstname', 'authors.id'], User.fields_for_order_statement('authors')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_fields_for_order_statement_with_blank_format_should_return_default
|
def test_fields_for_order_statement_with_blank_format_should_return_default
|
||||||
with_settings :user_format => '' do
|
with_settings :user_format => '' do
|
||||||
assert_equal ['users.firstname', 'users.lastname', 'users.id'], User.fields_for_order_statement
|
assert_equal ['users.firstname', 'users.lastname', 'users.id'], User.fields_for_order_statement
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_fields_for_order_statement_with_invalid_format_should_return_default
|
def test_fields_for_order_statement_with_invalid_format_should_return_default
|
||||||
with_settings :user_format => 'foo' do
|
with_settings :user_format => 'foo' do
|
||||||
assert_equal ['users.firstname', 'users.lastname', 'users.id'], User.fields_for_order_statement
|
assert_equal ['users.firstname', 'users.lastname', 'users.id'], User.fields_for_order_statement
|
||||||
|
@ -614,7 +614,7 @@ class UserTest < ActiveSupport::TestCase
|
||||||
@auth_source.account_password = ''
|
@auth_source.account_password = ''
|
||||||
@auth_source.save!
|
@auth_source.save!
|
||||||
end
|
end
|
||||||
|
|
||||||
context "with a successful authentication" do
|
context "with a successful authentication" do
|
||||||
should "create a new user account if it doesn't exist" do
|
should "create a new user account if it doesn't exist" do
|
||||||
assert_difference('User.count') do
|
assert_difference('User.count') do
|
||||||
|
@ -623,7 +623,7 @@ class UserTest < ActiveSupport::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "with an unsuccessful authentication" do
|
context "with an unsuccessful authentication" do
|
||||||
should "return nil" do
|
should "return nil" do
|
||||||
assert_nil User.try_to_login('example1', '11111')
|
assert_nil User.try_to_login('example1', '11111')
|
||||||
|
|
Loading…
Reference in New Issue