Skip to content
Snippets Groups Projects
Unverified Commit d12e6029 authored by azul's avatar azul
Browse files

fix #8010 - publish public key in webfinger

we were simply referring to the wrong key.
includes test
parent f6189ee3
No related branches found
No related tags found
1 merge request!52fix #8010 - publish public key in webfinger
Pipeline #
......@@ -2,6 +2,6 @@
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
<Subject><%= @presenter.subject %></Subject>
<%- @presenter.links.each do |rel, link| %>
<Link rel=<%=rel%> type=<%=link[:type]%> href="<%= link[:key] %>"/>
<Link rel=<%=rel%> type=<%=link[:type]%> href="<%= link[:href] %>"/>
<% end %>
</XRD>
......@@ -15,11 +15,13 @@ class WebfingerControllerTest < ActionController::TestCase
end
test "get user webfinger xml" do
@user = stub_record :user, :public_key => 'my public key'
key = 'my public key'
@user = stub_record :user, :public_key => key
User.stubs(:find_by_login).with(@user.login).returns(@user)
get :search, :q => @user.email_address.to_s, :format => :xml
assert_response :success
assert_equal "application/xml", response.content_type
assert_includes response.body, Base64.encode64(key)
end
test "get user webfinger json" do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment