incubator-heraldry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ket...@apache.org
Subject svn commit: r463001 [2/2] - in /incubator/heraldry/libraries/ruby/yadis: ./ trunk/ trunk/admin/ trunk/examples/ trunk/lib/ trunk/lib/yadis/ trunk/test/ trunk/test/data/
Date Wed, 11 Oct 2006 22:17:08 GMT
Added: incubator/heraldry/libraries/ruby/yadis/trunk/test/data/index.html
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/ruby/yadis/trunk/test/data/index.html?view=auto&rev=463001
==============================================================================
--- incubator/heraldry/libraries/ruby/yadis/trunk/test/data/index.html (added)
+++ incubator/heraldry/libraries/ruby/yadis/trunk/test/data/index.html Wed Oct 11 15:17:05
2006
@@ -0,0 +1,29 @@
+<html>
+
+  <head>
+
+    <meta http-equiv="X-XRDS-Location" content="http://brian.myopenid.com/xrds" />
+    <meta http-equiv="X-YADIS-Location" content="http://brian.myopenid.com/xrds" />
+	
+    <link rel="openid.server" href="http://www.myopenid.com/server" />
+    <link rel="openid.delegate" href="http://brian.myopenid.com/" />
+
+    <title>Foo</title>
+    <style type="text/css">
+      * {font-family: sans-serif; color: #555; font-size: 1em;}
+      body {background-color: #eee;}
+      a {color: #555;}
+      img {border:2px solid #bbb;}
+      #main {text-align:center; margin-top:4em;}
+      #menu {}
+    </style>
+
+  </head>
+
+  <body>
+    <div id="main">
+      stuff
+    </div>
+  </body>
+
+</html>
\ No newline at end of file

Added: incubator/heraldry/libraries/ruby/yadis/trunk/test/data/index_xrds.html
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/ruby/yadis/trunk/test/data/index_xrds.html?view=auto&rev=463001
==============================================================================
--- incubator/heraldry/libraries/ruby/yadis/trunk/test/data/index_xrds.html (added)
+++ incubator/heraldry/libraries/ruby/yadis/trunk/test/data/index_xrds.html Wed Oct 11 15:17:05
2006
@@ -0,0 +1,25 @@
+<html>
+
+  <head>
+
+    <meta http-equiv="X-XRDS-Location" content="http://brian.myopenid.com/xrds" />
+
+    <title>Foo</title>
+    <style type="text/css">
+      * {font-family: sans-serif; color: #555; font-size: 1em;}
+      body {background-color: #eee;}
+      a {color: #555;}
+      img {border:2px solid #bbb;}
+      #main {text-align:center; margin-top:4em;}
+      #menu {}
+    </style>
+
+  </head>
+
+  <body>
+    <div id="main">
+      stuff
+    </div>
+  </body>
+
+</html>
\ No newline at end of file

Added: incubator/heraldry/libraries/ruby/yadis/trunk/test/data/index_yadis.html
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/ruby/yadis/trunk/test/data/index_yadis.html?view=auto&rev=463001
==============================================================================
--- incubator/heraldry/libraries/ruby/yadis/trunk/test/data/index_yadis.html (added)
+++ incubator/heraldry/libraries/ruby/yadis/trunk/test/data/index_yadis.html Wed Oct 11 15:17:05
2006
@@ -0,0 +1,26 @@
+<html>
+
+  <head>
+
+    <meta http-equiv="X-YADIS-Location" content="http://brian.myopenid.com/xrds" />
+	
+
+    <title>Foo</title>
+    <style type="text/css">
+      * {font-family: sans-serif; color: #555; font-size: 1em;}
+      body {background-color: #eee;}
+      a {color: #555;}
+      img {border:2px solid #bbb;}
+      #main {text-align:center; margin-top:4em;}
+      #menu {}
+    </style>
+
+  </head>
+
+  <body>
+    <div id="main">
+      stuff
+    </div>
+  </body>
+
+</html>
\ No newline at end of file

Added: incubator/heraldry/libraries/ruby/yadis/trunk/test/data/keturn.xrds
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/ruby/yadis/trunk/test/data/keturn.xrds?view=auto&rev=463001
==============================================================================
--- incubator/heraldry/libraries/ruby/yadis/trunk/test/data/keturn.xrds (added)
+++ incubator/heraldry/libraries/ruby/yadis/trunk/test/data/keturn.xrds Wed Oct 11 15:17:05
2006
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XRDS ref="xri://=keturn">
+ <XRD xmlns:xrd="xri://$xrd*($v*2.0)">
+  <Query>*keturn</Query>
+  <Status code="100"/>
+  <Expires>2006-05-31T02:45:37.000Z</Expires>
+  <ProviderID>xri://=</ProviderID>
+  <LocalID priority="10">!2397.58EC.8F7D.D097</LocalID>
+  <CanonicalID priority="10">=!2397.58EC.8F7D.D097</CanonicalID>
+  <Service priority="10">
+   <Type/>
+   <Type>xri://+i-service*(+forwarding)*($v*1.0)</Type>
+   <ProviderID>xri://!!1003</ProviderID>
+   <URI priority="10">https://forwarding.godaddy.amsoftsystems.com</URI>
+  </Service>
+  <Service priority="10">
+   <Type>xri://+i-service*(+contact)*($v*1.0)</Type>
+   <ProviderID>xri://!!1003</ProviderID>
+   <Path>+contact</Path>
+   <MediaType/>
+   <MediaType>text/html</MediaType>
+   <URI priority="10">https://contact.godaddy.amsoftsystems.com</URI>
+  </Service>
+  <Service priority="10">
+   <Type>xri://+i-service*(+authn)*(+saml)*($v*1.0)</Type>
+   <ProviderID>xri://!!1003</ProviderID>
+   <Path>+login</Path>
+   <URI priority="10">https://isso.godaddy.amsoftsystems.com</URI>
+  </Service>
+ </XRD>
+</XRDS>
+

Added: incubator/heraldry/libraries/ruby/yadis/trunk/test/data/manifest.txt
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/ruby/yadis/trunk/test/data/manifest.txt?view=auto&rev=463001
==============================================================================
--- incubator/heraldry/libraries/ruby/yadis/trunk/test/data/manifest.txt (added)
+++ incubator/heraldry/libraries/ruby/yadis/trunk/test/data/manifest.txt Wed Oct 11 15:17:05
2006
@@ -0,0 +1,30 @@
+# This file contains test cases for doing YADIS identity URL and
+# service discovery. For each case, there are three URLs. The first
+# URL is the user input. The second is the identity URL and the third
+# is the URL from which the XRDS document should be read.
+#
+# The file format is as follows:
+# User URL <tab> Identity URL <tab> XRDS URL <newline>
+#
+# blank lines and lines starting with # should be ignored.
+#
+# To use this test:
+#
+# 1. Run your discovery routine on the User URL.
+#
+# 2. Compare the identity URL returned by the discovery routine to the
+#    identity URL on that line of the file. It must be an EXACT match.
+#
+# 3. Do a regular HTTP GET on the XRDS URL. Compare the content that
+#    was returned by your discovery routine with the content returned
+#    from that URL. It should also be an exact match.
+
+http://www.openidenabled.com/resources/yadis-test/discover/equiv	http://www.openidenabled.com/resources/yadis-test/discover/equiv
http://www.openidenabled.com/resources/yadis-test/discover/xrds
+http://www.openidenabled.com/resources/yadis-test/discover/header	http://www.openidenabled.com/resources/yadis-test/discover/header
http://www.openidenabled.com/resources/yadis-test/discover/xrds
+http://www.openidenabled.com/resources/yadis-test/discover/xrds	http://www.openidenabled.com/resources/yadis-test/discover/xrds
http://www.openidenabled.com/resources/yadis-test/discover/xrds
+http://www.openidenabled.com/resources/yadis-test/discover/xrds_html	http://www.openidenabled.com/resources/yadis-test/discover/xrds_html
http://www.openidenabled.com/resources/yadis-test/discover/xrds_html
+http://www.openidenabled.com/resources/yadis-test/discover/redir_equiv	http://www.openidenabled.com/resources/yadis-test/discover/equiv
http://www.openidenabled.com/resources/yadis-test/discover/xrds
+http://www.openidenabled.com/resources/yadis-test/discover/redir_header	http://www.openidenabled.com/resources/yadis-test/discover/header
http://www.openidenabled.com/resources/yadis-test/discover/xrds
+http://www.openidenabled.com/resources/yadis-test/discover/redir_xrds	http://www.openidenabled.com/resources/yadis-test/discover/xrds
http://www.openidenabled.com/resources/yadis-test/discover/xrds
+http://www.openidenabled.com/resources/yadis-test/discover/redir_xrds_html	http://www.openidenabled.com/resources/yadis-test/discover/xrds_html
http://www.openidenabled.com/resources/yadis-test/discover/xrds_html
+http://www.openidenabled.com/resources/yadis-test/discover/redir_redir_equiv	http://www.openidenabled.com/resources/yadis-test/discover/equiv
http://www.openidenabled.com/resources/yadis-test/discover/xrds

Added: incubator/heraldry/libraries/ruby/yadis/trunk/test/data/proxy-june1.xrds
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/ruby/yadis/trunk/test/data/proxy-june1.xrds?view=auto&rev=463001
==============================================================================
--- incubator/heraldry/libraries/ruby/yadis/trunk/test/data/proxy-june1.xrds (added)
+++ incubator/heraldry/libraries/ruby/yadis/trunk/test/data/proxy-june1.xrds Wed Oct 11 15:17:05
2006
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XRDS ref="xri://=keturn" xmlns="xri://$xrds">
+ <XRD xmlns="xri://$xrd*($v*2.0)">
+  <Query>*keturn</Query>
+  <Status code="100"/>
+  <Expires>2006-06-01T18:00:49.000Z</Expires>
+  <ProviderID>xri://=</ProviderID>
+  <LocalID priority="10">!2397.58EC.8F7D.D097</LocalID>
+  <CanonicalID priority="10">=!2397.58EC.8F7D.D097</CanonicalID>
+  <Service priority="10">
+   <Type/>
+   <Type>xri://+i-service*(+forwarding)*($v*1.0)</Type>
+   <ProviderID>xri://!!1003</ProviderID>
+   <URI priority="10">https://forwarding.godaddy.amsoftsystems.com</URI>
+  </Service>
+  <Service priority="10">
+   <Type>xri://+i-service*(+contact)*($v*1.0)</Type>
+   <ProviderID>xri://!!1003</ProviderID>
+   <Path>+contact</Path>
+   <MediaType/>
+   <MediaType>text/html</MediaType>
+   <URI priority="10">https://contact.godaddy.amsoftsystems.com</URI>
+  </Service>
+  <Service priority="10">
+   <Type>xri://+i-service*(+authn)*(+saml)*($v*1.0)</Type>
+   <ProviderID>xri://!!1003</ProviderID>
+   <Path>+login</Path>
+   <URI priority="10">https://isso.godaddy.amsoftsystems.com</URI>
+  </Service>
+ </XRD>
+</XRDS>

Added: incubator/heraldry/libraries/ruby/yadis/trunk/test/data/weirdver.xrds
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/ruby/yadis/trunk/test/data/weirdver.xrds?view=auto&rev=463001
==============================================================================
--- incubator/heraldry/libraries/ruby/yadis/trunk/test/data/weirdver.xrds (added)
+++ incubator/heraldry/libraries/ruby/yadis/trunk/test/data/weirdver.xrds Wed Oct 11 15:17:05
2006
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xrds:XRDS
+    xmlns:xrds="xri://$xrds"
+    xmlns:openid="http://openid.net/xmlns/1.0"
+    xmlns="xri://$xrd*($v*1.14121)">
+  <XRD>
+
+    <Service priority="0">
+      <Type>http://openid.net/signon/1.0</Type>
+      <URI>http://www.myopenid.com/server</URI>
+      <openid:Delegate>http://brian.myopenid.com/</openid:Delegate>
+    </Service>
+
+  </XRD>
+</xrds:XRDS>

Added: incubator/heraldry/libraries/ruby/yadis/trunk/test/runtests.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/ruby/yadis/trunk/test/runtests.rb?view=auto&rev=463001
==============================================================================
--- incubator/heraldry/libraries/ruby/yadis/trunk/test/runtests.rb (added)
+++ incubator/heraldry/libraries/ruby/yadis/trunk/test/runtests.rb Wed Oct 11 15:17:05 2006
@@ -0,0 +1,7 @@
+#!/usr/bin/env ruby
+
+require 'test_discovery'
+require 'test_parse'
+require 'test_xrds'
+require 'test_yadis'
+

Propchange: incubator/heraldry/libraries/ruby/yadis/trunk/test/runtests.rb
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/heraldry/libraries/ruby/yadis/trunk/test/test_discovery.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/ruby/yadis/trunk/test/test_discovery.rb?view=auto&rev=463001
==============================================================================
--- incubator/heraldry/libraries/ruby/yadis/trunk/test/test_discovery.rb (added)
+++ incubator/heraldry/libraries/ruby/yadis/trunk/test/test_discovery.rb Wed Oct 11 15:17:05
2006
@@ -0,0 +1,47 @@
+require 'test/unit'
+require 'yadis'
+
+# run all the discovery tests from
+# http://www.openidenabled.com/resources/yadis-test/discover/manifest.txt
+# a local copy of the test data is in data/manifest.txt
+
+class DiscoveryTestCase < Test::Unit::TestCase
+
+  def setup
+    @cases = []
+    File.open('data/manifest.txt').each_line do |line|
+      line.strip!
+      if line.index('#') != 0 and line
+        @cases << line.split(' ', 3) if line.length > 0
+      end
+    end
+
+  end
+
+  def test_discovery
+    @cases.each_with_index do |x, i|
+      input, redir_uri, xrds_uri = x
+      y = YADIS.discover(input)
+      assert_not_nil(y)
+      assert_equal(redir_uri, y.uri)
+      assert_equal(xrds_uri, y.xrds_uri)
+    end
+  end
+
+  def test_bad
+    assert_nil(YADIS.discover(nil))
+    assert_nil(YADIS.discover(5))
+
+    # not a valid uri
+    assert_nil(YADIS.discover('foo.com'))
+
+    # not a yadis uri
+    assert_nil(YADIS.discover('http://google.com/?q=huh'))
+  end
+
+  def test_marshal
+    y = YADIS.discover('http://brian.myopenid.com/')
+    Marshal.dump(y)
+  end
+
+end

Added: incubator/heraldry/libraries/ruby/yadis/trunk/test/test_parse.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/ruby/yadis/trunk/test/test_parse.rb?view=auto&rev=463001
==============================================================================
--- incubator/heraldry/libraries/ruby/yadis/trunk/test/test_parse.rb (added)
+++ incubator/heraldry/libraries/ruby/yadis/trunk/test/test_parse.rb Wed Oct 11 15:17:05 2006
@@ -0,0 +1,37 @@
+require 'test/unit'
+require 'yadis/parsehtml'
+
+class YadisHTMLParseTestCase < Test::Unit::TestCase
+
+  def check(x, html)
+    result = html_yadis_location(html)
+    assert_equal(x, result)
+  end
+
+  def test_valid
+    check('foo', '<html><head><meta http-equiv="X-YADIS-LOCATION" content="foo"/></head></html>')
+    
+    check('foo', '<html><head><meta http-equiv="X-YADIS-LOCATION" content="foo"/></head></html>')
+    check('foo', '<html><head><meta http-equiv="X-YADIS-LOCATION" content="foo"/></head></html>')
+    check('foo', '<html><head><meta HTTP-EQUIV="X-YADIS-LOCATION" CONTENT="foo"/></head></html>')
+    check('foo', '<html><head><meta HTTP-EQUIV="X-YADIS-Location" CONTENT="foo"/></head></html>')
+    check('http://brian.myopenid.com/xrds', File.open('data/index.html').read)
+    check('http://brian.myopenid.com/xrds', File.open('data/index_xrds.html').read)
+    check('http://brian.myopenid.com/xrds', File.open('data/index_yadis.html').read)
+  end
+
+  def test_fail
+    check(nil, '')
+    check(nil, nil)
+    check(nil, 5)
+    check(nil, '<html></html>')
+
+    # no content attr
+    check(nil, '<html><head><meta http-equiv="x-yadis-location" /><meta
http-equiv="X-YADIS-LOCATION" content="foo"/></head></html>')
+
+    # not in head
+    check(nil, '<html><meta http-equiv="X-YADIS-LOCATION" content="foo"/></html>')
+    check(nil, '<html><body><meta http-equiv="X-YADIS-LOCATION" content="foo"/></html>')
+  end
+
+end

Added: incubator/heraldry/libraries/ruby/yadis/trunk/test/test_xrds.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/ruby/yadis/trunk/test/test_xrds.rb?view=auto&rev=463001
==============================================================================
--- incubator/heraldry/libraries/ruby/yadis/trunk/test/test_xrds.rb (added)
+++ incubator/heraldry/libraries/ruby/yadis/trunk/test/test_xrds.rb Wed Oct 11 15:17:05 2006
@@ -0,0 +1,75 @@
+require 'test/unit'
+require 'yadis/xrds'
+
+class XRDSTestCase < Test::Unit::TestCase
+
+  def test_xrds_good
+    File.open('data/brian.xrds') do |f|
+      xrds = XRDS.new(f.read)
+      assert_not_nil(xrds)
+      assert_equal(xrds.services.length, 1)      
+    end
+
+    File.open('data/brianellin.mylid.xrds') do |f|
+      xrds = XRDS.new(f.read)
+      assert_not_nil(xrds)
+      assert_equal(xrds.services.length, 9)
+
+      service = xrds.services[0]
+      assert_not_nil(service)
+      assert_not_nil(service.uri)
+    end
+  end
+
+  def test_xrds_good_multi
+    File.open('data/brian.multi.xrds') do |f|
+      xrds = XRDS.new(f.read)
+      assert_not_nil(xrds)
+      assert_equal(1, xrds.services.length)      
+      s = xrds.services[0]
+      assert s.service_types.member?('http://openid.net/signon/1.0')
+    end
+  end
+
+  def test_xrds_good_uri_multi
+    File.open('data/brian.multi_uri.xrds') do |f|
+      xrds = XRDS.new(f.read)
+      assert_not_nil(xrds)
+      assert_equal(2, xrds.services.length)
+    end
+  end
+
+  # This is like brian.multi, but uses namespaces a little differently.
+  def test_xrds_good_namespaces
+    File.open('data/proxy-june1.xrds') do |f|
+      xrds = XRDS.new(f.read)
+      assert_not_nil(xrds)
+      assert_equal(3, xrds.services.length)
+    end
+  end
+
+  def test_xrds_unknown_xrd_version
+    File.open('data/weirdver.xrds') do |f|
+      xrds = XRDS.parse(f.read)
+      assert_nil(xrds)
+    end
+ end
+
+  def test_xrds_bad
+    assert_nil(XRDS.parse(nil))
+    assert_nil(XRDS.parse(5))
+    assert_nil(XRDS.parse(''))
+    assert_nil(XRDS.parse('<html></html>'))
+    assert_nil(XRDS.parse('\000'))
+  end
+
+  def test_marshal
+    File.open('data/brian.xrds') do |f|
+      xrds = XRDS.new(f.read)
+      s = Marshal.dump(xrds)
+      xrds2 = Marshal.load(s)
+      assert_equal(xrds.services, xrds2.services)
+    end   
+  end
+
+end

Added: incubator/heraldry/libraries/ruby/yadis/trunk/test/test_xri.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/ruby/yadis/trunk/test/test_xri.rb?view=auto&rev=463001
==============================================================================
--- incubator/heraldry/libraries/ruby/yadis/trunk/test/test_xri.rb (added)
+++ incubator/heraldry/libraries/ruby/yadis/trunk/test/test_xri.rb Wed Oct 11 15:17:05 2006
@@ -0,0 +1,67 @@
+require 'test/unit'
+require 'yadis/xri'
+
+class XriDiscoveryTestCase < Test::Unit::TestCase
+  
+  def test_isXRI?
+    assert_equal(:xri, XRI.identifier_scheme('=john.smith'))
+    assert_equal(:xri, XRI.identifier_scheme('@smiths/john'))
+    assert_equal(:xri, XRI.identifier_scheme('xri://=john'))
+    assert_equal(:xri, XRI.identifier_scheme('@ootao*test1'))
+    assert_equal(:uri, XRI.identifier_scheme('smoker.myopenid.com'))
+    assert_equal(:uri, XRI.identifier_scheme('http://smoker.myopenid.com'))
+    assert_equal(:uri, XRI.identifier_scheme('https://smoker.myopenid.com'))
+  end
+end
+
+class XriEscapingTestCase < Test::Unit::TestCase
+  def test_escaping_percents
+    assert_equal('@example/abc%252Fd/ef', 
+                 XRI.escape_for_iri('@example/abc%2Fd/ef'))
+  end
+
+  def test_escaping_xref
+    # no escapes
+    assert_equal('@example/foo/(@bar)',
+                 XRI.escape_for_iri('@example/foo/(@bar)'))
+    # escape slashes
+    assert_equal('@example/foo/(@bar%2Fbaz)',
+                 XRI.escape_for_iri('@example/foo/(@bar/baz)'))
+    # escape query ? and fragment #
+    assert_equal('@example/foo/(@baz%3Fp=q%23r)?i=j#k',
+                 XRI.escape_for_iri('@example/foo/(@baz?p=q#r)?i=j#k'))
+  end
+end
+
+class XriTransformationTestCase < Test::Unit::TestCase
+  def test_to_iri_normal
+    assert_equal('xri://@example', XRI.to_iri_normal('@example'))
+  end
+# iri_to_url:
+#   various ucschar to hex
+end
+
+H = 'http://xri.example.com/'
+# ST = 'http://openid.net/signon/1.2'
+ST = 'xri://+i-service*(+forwarding)*($v*1.0)'
+class ProxyQueryTestCase < Test::Unit::TestCase
+  def setup
+    @proxy = XRI::ProxyResolver.new(H)
+  end
+
+  def test_proxy_url
+    args_esc = "_xrd_r=application%2Fxrds%2Bxml&_xrd_t=#{CGI::escape(ST)}"
+    self.assert_equal(H + '=foo?' + args_esc, @proxy.query_url('=foo', ST))
+    self.assert_equal(H + '=foo/bar?baz&' + args_esc, 
+                      @proxy.query_url('=foo/bar?baz', ST))
+    self.assert_equal(H + '=foo/bar?baz=quux&' + args_esc, 
+                      @proxy.query_url('=foo/bar?baz=quux', ST))
+    self.assert_equal(H + '=foo/bar?mi=fa&so=la&' + args_esc, 
+                      @proxy.query_url('=foo/bar?mi=fa&so=la', ST))
+# TODO:
+#     self.assert_equal(H + '=foo/bar??' + args_esc, 
+#                       @proxy.query_url('=foo/bar?', ST))
+#     self.assert_equal(H + '=foo/bar????' + args_esc, 
+#                       @proxy.query_url('=foo/bar???', ST))
+  end
+end

Added: incubator/heraldry/libraries/ruby/yadis/trunk/test/test_yadis.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/ruby/yadis/trunk/test/test_yadis.rb?view=auto&rev=463001
==============================================================================
--- incubator/heraldry/libraries/ruby/yadis/trunk/test/test_yadis.rb (added)
+++ incubator/heraldry/libraries/ruby/yadis/trunk/test/test_yadis.rb Wed Oct 11 15:17:05 2006
@@ -0,0 +1,19 @@
+require 'test/unit'
+require 'yadis'
+
+class YADISTestCase < Test::Unit::TestCase
+
+  def test_yadis_lid
+    # need an xrds with lid stuff in it for this part
+  end
+
+  def test_priority
+    xrds = XRDS.parse(File.open('data/brian_priority.xrds').read)    
+    assert_equal(2, xrds.services.length)
+    assert_equal('http://www.myopenid.com/server', xrds.services[0].uri)
+    assert_equal('http://www.schtuff.com/?action=openid_server',
+                 xrds.services[1].uri)
+  end
+
+
+end



Mime
View raw message