aboutsummaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2019-10-24 14:42:14 +0700
committerEgor Kislitsyn <egor@kislitsyn.com>2019-10-24 14:55:36 +0700
commit4c1dd55c48f80f3ebdb26d1a0c1a75b7922f578c (patch)
treef296a9b23362e59daf1eac6b669886be8dab1576 /test/support
parent478f0883eb994c639923b7b27259a02bcef8708c (diff)
parent17c237ba808d4356bb1e202e459680563b79ef99 (diff)
downloadpleroma-4c1dd55c48f80f3ebdb26d1a0c1a75b7922f578c.tar.gz
Merge remote-tracking branch 'upstream/develop' into refactor/following-relationships
Diffstat (limited to 'test/support')
-rw-r--r--test/support/factory.ex9
-rw-r--r--test/support/http_request_mock.ex8
2 files changed, 17 insertions, 0 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex
index 4bd4c145a..e3f797f64 100644
--- a/test/support/factory.ex
+++ b/test/support/factory.ex
@@ -376,4 +376,13 @@ defmodule Pleroma.Factory do
)
}
end
+
+ def marker_factory do
+ %Pleroma.Marker{
+ user: build(:user),
+ timeline: "notifications",
+ lock_version: 0,
+ last_read_id: "1"
+ }
+ end
end
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex
index 7d65209fb..eba22c40b 100644
--- a/test/support/http_request_mock.ex
+++ b/test/support/http_request_mock.ex
@@ -348,6 +348,14 @@ defmodule HttpRequestMock do
}}
end
+ def get("http://mastodon.example.org/users/relay", _, _, Accept: "application/activity+json") do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/relay@mastdon.example.org.json")
+ }}
+ end
+
def get("http://mastodon.example.org/users/gargron", _, _, Accept: "application/activity+json") do
{:error, :nxdomain}
end