HttpRequestMock: Add missing mocks for object containment tests
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Sun, 14 Jul 2019 11:31:43 +0000 (13:31 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Sun, 14 Jul 2019 11:55:41 +0000 (13:55 +0200)
test/support/http_request_mock.ex

index ff6bb78f9f8c0e8919eeb438242a37af5aabe01a..80586426b7fa9d01bf654096b57d9b48078d742a 100644 (file)
@@ -879,6 +879,30 @@ defmodule HttpRequestMock do
      }}
   end
 
+  def get("https://info.pleroma.site/activity.json", _, _, Accept: "application/activity+json") do
+    {:ok,
+     %Tesla.Env{
+       status: 200,
+       body: File.read!("test/fixtures/tesla_mock/https__info.pleroma.site_activity.json")
+     }}
+  end
+
+  def get("https://info.pleroma.site/activity2.json", _, _, Accept: "application/activity+json") do
+    {:ok,
+     %Tesla.Env{
+       status: 200,
+       body: File.read!("test/fixtures/tesla_mock/https__info.pleroma.site_activity2.json")
+     }}
+  end
+
+  def get("https://info.pleroma.site/activity3.json", _, _, Accept: "application/activity+json") do
+    {:ok,
+     %Tesla.Env{
+       status: 200,
+       body: File.read!("test/fixtures/tesla_mock/https__info.pleroma.site_activity3.json")
+     }}
+  end
+
   def get(url, query, body, headers) do
     {:error,
      "Not implemented the mock response for get #{inspect(url)}, #{query}, #{inspect(body)}, #{