diff tests/test.ur @ 3:f59083771ee2

Saving associations
author Adam Chlipala <adam@chlipala.net>
date Sun, 26 Dec 2010 15:11:23 -0500
parents b757dc2bd2f6
children 2d409aff8800
line wrap: on
line diff
--- a/tests/test.ur	Sun Dec 26 13:28:06 2010 -0500
+++ b/tests/test.ur	Sun Dec 26 15:11:23 2010 -0500
@@ -2,10 +2,11 @@
     dy <- Openid.discover r.Id;
     case dy of
         None => return <xml>No dice</xml>
-      | Some dy => return <xml><body>
-        Endpoint: {[dy.Endpoint]}<br/>
-        Local ID: {[dy.LocalId]}<br/>
-      </body></xml>
+      | Some dy =>
+        os <- Openid.association dy.Endpoint;
+        case os of
+            Openid.Error s => error <xml>{[s]}</xml>
+          | Openid.Handle s => return <xml>{[s]}</xml>
 
 fun main () = return <xml><body>
   <form>