diff --git a/test/data/test_discover/openid_utf8.html b/test/data/test_discover/openid_utf8.html new file mode 100644 index 00000000..c98001af --- /dev/null +++ b/test/data/test_discover/openid_utf8.html @@ -0,0 +1,11 @@ + + + + Identity Page for Smoker + + + + +

こんにちは

+ + diff --git a/test/test_discover.rb b/test/test_discover.rb index 13b115ce..71511c3e 100644 --- a/test/test_discover.rb +++ b/test/test_discover.rb @@ -369,6 +369,20 @@ def test_html1And2 } end + def test_html_utf8 + utf8_html = read_data_file('test_discover/openid_utf8.html', false) + utf8_html.force_encoding("UTF-8") if utf8_html.respond_to?(:force_encoding) + services = _discover('text/html', utf8_html, 1) + + _checkService(services[0], + "http://www.myopenid.com/server", + @id_url, + 'http://smoker.myopenid.com/', + nil, + ['1.1'], + false) + end + def test_yadisEmpty services = _discover('application/xrds+xml', read_data_file('test_discover/yadis_0entries.xml', false),