]> cat aescling's git repositories - mastodon.git/commitdiff
Cover WellKnown::HostMetaController more (#3382)
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Mon, 29 May 2017 16:05:30 +0000 (01:05 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 29 May 2017 16:05:30 +0000 (18:05 +0200)
spec/controllers/well_known/host_meta_controller_spec.rb

index 8a040021a6e9f4074cb70453f3b9a5e2e1147d67..d647dc97a41a10048ea73f38577f214725c351bb 100644 (file)
@@ -8,6 +8,13 @@ describe WellKnown::HostMetaController, type: :controller do
       get :show, format: :xml
 
       expect(response).to have_http_status(:success)
+      expect(response.content_type).to eq 'application/xrd+xml'
+      expect(response.body).to eq <<XML
+<?xml version="1.0"?>
+<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
+  <Link rel="lrdd" type="application/xrd+xml" template="http://test.host/.well-known/webfinger?resource={uri}"/>
+</XRD>
+XML
     end
   end
 end