# OpenID authentification test failure

**URL:** <https://www.ruby-forum.com/t/openid-authentification-test-failure/114794>\
**Category:** Rails\
**Created:** [September 17, 2007, 2:39pm UTC](https://www.ruby-forum.com/t/openid-authentification-test-failure/114794 "2007-09-17T14:39:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [September 17, 2007, 2:39pm UTC](https://www.ruby-forum.com/t/openid-authentification-test-failure/114794/1 "2007-09-17T14:39:06Z")

</div>

Does anyone already used this plugin ? I am testing it and I get an  
error in testing the normalize\_test.rb  
action : broken\_open\_id

def test\_broken\_open\_id  
assert\_raises(InvalidOpenId) { normalize\_url("=name") }  
end

the failure error is :

1. Failure:  
test\_broken\_open\_id(NormalizeTest)  
[vendor/plugins/open\_id\_authentication/test/normalize\_test.rb:33]:  
OpenIdAuthentication::InvalidOpenId exception expected but was  
Class:   
Message: \<“uninitialized constant OpenIdAuthentication::URI”\>

* * *

looking in the open\_id\_authentification.rb, I cannot see where the  
constant is used ???

```
def normalize_url(url)
  OpenIdAuthentication.normalize_url(url)
end

```

def self.normalize\_url(url)  
begin  
uri = URI.parse(url)  
uri = URI.parse(“http://#{uri}”) unless uri.scheme  
uri.scheme = uri.scheme.downcase # URI should do this  
uri.normalize.to\_s  
rescue URI::InvalidURIError  
raise InvalidOpenId.new("#{url} is not an OpenID URL")  
end  
end
