X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fsupport%2Fhttpoison_mock.ex;h=527c2e1f7f6ac6f03661f032fcc27f4dc03fb5ae;hb=b8560e5ed5612e37af8a759128e322025922a862;hp=befebad8a798569697e7d6772f077619e62740ba;hpb=3f42806b1b8f0a2c27dda4821ab61c92b9a4652f;p=akkoma diff --git a/test/support/httpoison_mock.ex b/test/support/httpoison_mock.ex index befebad8a..527c2e1f7 100644 --- a/test/support/httpoison_mock.ex +++ b/test/support/httpoison_mock.ex @@ -3,6 +3,14 @@ defmodule HTTPoisonMock do def get(url, body \\ [], headers \\ []) + def get("https://puckipedia.com/", [Accept: "application/activity+json"], _) do + {:ok, + %Response{ + status_code: 200, + body: File.read!("test/fixtures/httpoison_mock/puckipedia.com.json") + }} + end + def get( "https://gerzilla.de/.well-known/webfinger?resource=acct:kaniini@gerzilla.de", [Accept: "application/xrd+xml,application/jrd+json"], @@ -736,6 +744,22 @@ defmodule HTTPoisonMock do }} end + def get("https://baptiste.gelez.xyz/~/PlumeDevelopment/this-month-in-plume-june-2018/", _, _) do + {:ok, + %Response{ + status_code: 200, + body: File.read!("test/fixtures/httpoison_mock/baptiste.gelex.xyz-article.json") + }} + end + + def get("https://baptiste.gelez.xyz/@/BaptisteGelez", _, _) do + {:ok, + %Response{ + status_code: 200, + body: File.read!("test/fixtures/httpoison_mock/baptiste.gelex.xyz-user.json") + }} + end + def get(url, body, headers) do {:error, "Not implemented the mock response for get #{inspect(url)}, #{inspect(body)}, #{