From 22c6c80310a8d3d3abbd1006598b4fbaec98ffd0 Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 22 Sep 2017 15:30:40 +0200 Subject: wkd: implement basic lookup of keys through wkd wkd is the web key directory. See the Readme.md in /lib/nickserver/wkd --- test/unit/wkd/url_test.rb | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'test/unit') diff --git a/test/unit/wkd/url_test.rb b/test/unit/wkd/url_test.rb index 9bf8f64..1f875b5 100644 --- a/test/unit/wkd/url_test.rb +++ b/test/unit/wkd/url_test.rb @@ -12,15 +12,30 @@ module Nickserver::Wkd assert_equal sample_url, url.to_s end + # we can be pretty sure this works for the person who proposed it + def test_gnupg_testuser_email + url = Url.new test_user_email + assert_equal test_user_url, url.to_s + end + protected + def test_user_email + Nickserver::EmailAddress.new 'dewey@test.gnupg.org' + end + + def test_user_url + 'https://test.gnupg.org/.well-known/openpgpkey/hu/' + + '1g8totoxbt4zf6na1sukczp5fiewr1oe' + end + def sample_email Nickserver::EmailAddress.new 'Joe.Doe@Example.ORG' end def sample_url - 'https://example.org/.well-known/openpgpkey/' + - 'hu/example.org/iy9q119eutrkn8s1mk4r39qejnbu3n5q' + 'https://example.org/.well-known/openpgpkey/hu/' + + 'iy9q119eutrkn8s1mk4r39qejnbu3n5q' end end end -- cgit v1.2.3