diff options
author | William Pitcock <nenolod@dereferenced.org> | 2018-10-17 19:27:05 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-10-17 19:27:05 +0000 |
commit | 958c5e02e8ba37a5412c46f944e0e8458b125ee8 (patch) | |
tree | 78157b0cb4c60fc024f4dbc0041db1d7dd53487f /test/support | |
parent | 582dbe5c8dceafdbcb266aeb43279456818e773a (diff) | |
download | pleroma-958c5e02e8ba37a5412c46f944e0e8458b125ee8.tar.gz |
tests: add a testcase for matching osada users in the formatter
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/httpoison_mock.ex | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/support/httpoison_mock.ex b/test/support/httpoison_mock.ex index d8b79abef..75c78d70e 100644 --- a/test/support/httpoison_mock.ex +++ b/test/support/httpoison_mock.ex @@ -3,6 +3,27 @@ defmodule HTTPoisonMock do def get(url, body \\ [], headers \\ []) + def get("https://osada.macgirvin.com/channel/mike", _, _) do + {:ok, + %Response{ + status_code: 200, + body: + File.read!("test/fixtures/httpoison_mock/https___osada.macgirvin.com_channel_mike.json") + }} + end + + def get( + "https://osada.macgirvin.com/.well-known/webfinger?resource=acct:mike@osada.macgirvin.com", + _, + _ + ) do + {:ok, + %Response{ + status_code: 200, + body: File.read!("test/fixtures/httpoison_mock/mike@osada.macgirvin.com.json") + }} + end + def get("https://info.pleroma.site/activity.json", _, _) do {:ok, %Response{ |