diff options
author | lain <lain@soykaf.club> | 2019-08-08 16:04:20 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-08-08 16:04:20 +0200 |
commit | a2b98f6d58218c5806247743aa0a2a600c9959ab (patch) | |
tree | 49914ac1e30561e1180651ad6b0fef5d96ecfb5c /test/support/http_request_mock.ex | |
parent | e4a01d253ef7ab09d028198e5e39b9aba357486c (diff) | |
parent | b18234e04c76daa564e0d8157dcd09566485da24 (diff) | |
download | pleroma-a2b98f6d58218c5806247743aa0a2a600c9959ab.tar.gz pleroma-a2b98f6d58218c5806247743aa0a2a600c9959ab.zip |
Merge remote-tracking branch 'origin/develop' into pleroma-conversations
Diffstat (limited to 'test/support/http_request_mock.ex')
-rw-r--r-- | test/support/http_request_mock.ex | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index 2ed5f5042..3adb5ba3b 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -51,6 +51,10 @@ defmodule HttpRequestMock do }} end + def get("https://mastodon.social/users/not_found", _, _, _) do + {:ok, %Tesla.Env{status: 404}} + end + def get("https://mastodon.sdf.org/users/rinpatch", _, _, _) do {:ok, %Tesla.Env{ @@ -792,6 +796,14 @@ defmodule HttpRequestMock do }} end + def get("http://localhost:4001/users/masto_closed/followers?page=1", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/users_mock/masto_closed_followers_page.json") + }} + end + def get("http://localhost:4001/users/masto_closed/following", _, _, _) do {:ok, %Tesla.Env{ @@ -800,6 +812,14 @@ defmodule HttpRequestMock do }} end + def get("http://localhost:4001/users/masto_closed/following?page=1", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/users_mock/masto_closed_following_page.json") + }} + end + def get("http://localhost:4001/users/fuser2/followers", _, _, _) do {:ok, %Tesla.Env{ |