fix indents of OpenID tests in UserTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12395 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
478a23bfa3
commit
4823d03423
|
@ -1115,38 +1115,35 @@ class UserTest < ActiveSupport::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
if Object.const_defined?(:OpenID)
|
if Object.const_defined?(:OpenID)
|
||||||
|
def test_setting_identity_url
|
||||||
|
normalized_open_id_url = 'http://example.com/'
|
||||||
|
u = User.new( :identity_url => 'http://example.com/' )
|
||||||
|
assert_equal normalized_open_id_url, u.identity_url
|
||||||
|
end
|
||||||
|
|
||||||
def test_setting_identity_url
|
def test_setting_identity_url_without_trailing_slash
|
||||||
normalized_open_id_url = 'http://example.com/'
|
normalized_open_id_url = 'http://example.com/'
|
||||||
u = User.new( :identity_url => 'http://example.com/' )
|
u = User.new( :identity_url => 'http://example.com' )
|
||||||
assert_equal normalized_open_id_url, u.identity_url
|
assert_equal normalized_open_id_url, u.identity_url
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_setting_identity_url_without_trailing_slash
|
def test_setting_identity_url_without_protocol
|
||||||
normalized_open_id_url = 'http://example.com/'
|
normalized_open_id_url = 'http://example.com/'
|
||||||
u = User.new( :identity_url => 'http://example.com' )
|
u = User.new( :identity_url => 'example.com' )
|
||||||
assert_equal normalized_open_id_url, u.identity_url
|
assert_equal normalized_open_id_url, u.identity_url
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_setting_identity_url_without_protocol
|
def test_setting_blank_identity_url
|
||||||
normalized_open_id_url = 'http://example.com/'
|
u = User.new( :identity_url => 'example.com' )
|
||||||
u = User.new( :identity_url => 'example.com' )
|
u.identity_url = ''
|
||||||
assert_equal normalized_open_id_url, u.identity_url
|
assert u.identity_url.blank?
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_setting_blank_identity_url
|
|
||||||
u = User.new( :identity_url => 'example.com' )
|
|
||||||
u.identity_url = ''
|
|
||||||
assert u.identity_url.blank?
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_setting_invalid_identity_url
|
|
||||||
u = User.new( :identity_url => 'this is not an openid url' )
|
|
||||||
assert u.identity_url.blank?
|
|
||||||
end
|
|
||||||
|
|
||||||
|
def test_setting_invalid_identity_url
|
||||||
|
u = User.new( :identity_url => 'this is not an openid url' )
|
||||||
|
assert u.identity_url.blank?
|
||||||
|
end
|
||||||
else
|
else
|
||||||
puts "Skipping openid tests."
|
puts "Skipping openid tests."
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue