@@ -67,6 +67,13 class AccountControllerTest < ActionController::TestCase | |||
|
67 | 67 | assert_redirected_to 'my/page' |
|
68 | 68 | end |
|
69 | 69 | |
|
70 | def test_login_with_invalid_openid_provider | |
|
71 | Setting.self_registration = '0' | |
|
72 | Setting.openid = '1' | |
|
73 | post :login, :openid_url => 'http;//openid.example.com/good_user' | |
|
74 | assert_redirected_to home_url | |
|
75 | end | |
|
76 | ||
|
70 | 77 | def test_login_with_openid_for_existing_non_active_user |
|
71 | 78 | Setting.self_registration = '2' |
|
72 | 79 | Setting.openid = '1' |
@@ -89,7 +89,7 module OpenIdAuthentication | |||
|
89 | 89 | |
|
90 | 90 | begin |
|
91 | 91 | uri = URI.parse(identifier) |
|
92 | uri.scheme = uri.scheme.downcase # URI should do this | |
|
92 | uri.scheme = uri.scheme.downcase if uri.scheme # URI should do this | |
|
93 | 93 | identifier = uri.normalize.to_s |
|
94 | 94 | rescue URI::InvalidURIError |
|
95 | 95 | raise InvalidOpenId.new("#{identifier} is not an OpenID identifier") |
General Comments 0
You need to be logged in to leave comments.
Login now