Merge branch 'bugfix/remove-others-follower-collections' into 'develop'
[akkoma] / test / web / web_finger / web_finger_controller_test.exs
index 423e9d1350bee62920458f156350230100e98e50..43fccfc7ab5241f948027589d807d9b66c821a94 100644 (file)
@@ -1,3 +1,7 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
 defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do
   use Pleroma.Web.ConnCase
 
@@ -25,9 +29,18 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do
 
     response =
       build_conn()
-      |> put_req_header("accept", "application/jrd+json")
+      |> put_req_header("accept", "application/xrd+xml")
       |> get("/.well-known/webfinger?resource=acct:#{user.nickname}@localhost")
 
     assert response(response, 200)
   end
+
+  test "Sends a 400 when resource param is missing" do
+    response =
+      build_conn()
+      |> put_req_header("accept", "application/xrd+xml,application/jrd+json")
+      |> get("/.well-known/webfinger")
+
+    assert response(response, 400)
+  end
 end