Topic: testing an OpenID customer and handling double redirect in functionals

Hi there,

here I am trying my best to test my recently implemented OpenID consumer functionality. I'm using ruby-openid in my app and it works great. but it is time to make automated testing. not so easy to handle actual redirects from an OpenID provider.

I found out about ROTS but it does not seems to be completely working as lastly stated by the developer itself.
http://blog.romanandreg.com/post/872162 … e-rots-gem

then, I finally decided to mock the openid lib into the minimum necessary to do proper testing. but I am still ending up with 2 redirects. On a normal case, my login process should be redirecting to the OpenID provider and I'm simply waiting for the browser to hit back. in my mocking, I skip the provider and do the redirect-to-self myself.

but it seems only the return code of the first post() call is handled.
if that post redirects to a page that redirects again. then I can only trap the first step.

I'd rather be able to forget about the intermediate step and assert on the last status.
but that does not seems to work this way.

anyone ever had that problem ?