projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
non condition dir creation
[akkoma]
/
test
/
pleroma
/
object_test.exs
diff --git
a/test/pleroma/object_test.exs
b/test/pleroma/object_test.exs
index 198d3b1cf1ac969016e0ca5effc2f0000ee9210b..5d4e6fb84691cb904aec72f4cafb10777718f92b 100644
(file)
--- a/
test/pleroma/object_test.exs
+++ b/
test/pleroma/object_test.exs
@@
-82,7
+82,7
@@
defmodule Pleroma.ObjectTest do
Pleroma.Config.put([:instance, :cleanup_attachments], false)
file = %Plug.Upload{
Pleroma.Config.put([:instance, :cleanup_attachments], false)
file = %Plug.Upload{
- content_type: "image/jpg",
+ content_type: "image/jp
e
g",
path: Path.absname("test/fixtures/image.jpg"),
filename: "an_image.jpg"
}
path: Path.absname("test/fixtures/image.jpg"),
filename: "an_image.jpg"
}
@@
-116,7
+116,7
@@
defmodule Pleroma.ObjectTest do
Pleroma.Config.put([:instance, :cleanup_attachments], true)
file = %Plug.Upload{
Pleroma.Config.put([:instance, :cleanup_attachments], true)
file = %Plug.Upload{
- content_type: "image/jpg",
+ content_type: "image/jp
e
g",
path: Path.absname("test/fixtures/image.jpg"),
filename: "an_image.jpg"
}
path: Path.absname("test/fixtures/image.jpg"),
filename: "an_image.jpg"
}
@@
-155,7
+155,7
@@
defmodule Pleroma.ObjectTest do
File.mkdir_p!(uploads_dir)
file = %Plug.Upload{
File.mkdir_p!(uploads_dir)
file = %Plug.Upload{
- content_type: "image/jpg",
+ content_type: "image/jp
e
g",
path: Path.absname("test/fixtures/image.jpg"),
filename: "an_image.jpg"
}
path: Path.absname("test/fixtures/image.jpg"),
filename: "an_image.jpg"
}
@@
-188,7
+188,7
@@
defmodule Pleroma.ObjectTest do
Pleroma.Config.put([:instance, :cleanup_attachments], true)
file = %Plug.Upload{
Pleroma.Config.put([:instance, :cleanup_attachments], true)
file = %Plug.Upload{
- content_type: "image/jpg",
+ content_type: "image/jp
e
g",
path: Path.absname("test/fixtures/image.jpg"),
filename: "an_image.jpg"
}
path: Path.absname("test/fixtures/image.jpg"),
filename: "an_image.jpg"
}
@@
-225,7
+225,7
@@
defmodule Pleroma.ObjectTest do
Pleroma.Config.put([:instance, :cleanup_attachments], true)
file = %Plug.Upload{
Pleroma.Config.put([:instance, :cleanup_attachments], true)
file = %Plug.Upload{
- content_type: "image/jpg",
+ content_type: "image/jp
e
g",
path: Path.absname("test/fixtures/image.jpg"),
filename: "an_image.jpg"
}
path: Path.absname("test/fixtures/image.jpg"),
filename: "an_image.jpg"
}
@@
-281,7
+281,11
@@
defmodule Pleroma.ObjectTest do
setup do
mock(fn
%{method: :get, url: "https://patch.cx/objects/9a172665-2bc5-452d-8428-2361d4c33b1d"} ->
setup do
mock(fn
%{method: :get, url: "https://patch.cx/objects/9a172665-2bc5-452d-8428-2361d4c33b1d"} ->
- %Tesla.Env{status: 200, body: File.read!("test/fixtures/tesla_mock/poll_original.json")}
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/poll_original.json"),
+ headers: HttpRequestMock.activitypub_object_headers()
+ }
env ->
apply(HttpRequestMock, :request, [env])
env ->
apply(HttpRequestMock, :request, [env])
@@
-315,7
+319,8
@@
defmodule Pleroma.ObjectTest do
mock_modified.(%Tesla.Env{
status: 200,
mock_modified.(%Tesla.Env{
status: 200,
- body: File.read!("test/fixtures/tesla_mock/poll_modified.json")
+ body: File.read!("test/fixtures/tesla_mock/poll_modified.json"),
+ headers: HttpRequestMock.activitypub_object_headers()
})
updated_object = Object.get_by_id_and_maybe_refetch(object.id, interval: -1)
})
updated_object = Object.get_by_id_and_maybe_refetch(object.id, interval: -1)
@@
-359,7
+364,8
@@
defmodule Pleroma.ObjectTest do
mock_modified.(%Tesla.Env{
status: 200,
mock_modified.(%Tesla.Env{
status: 200,
- body: File.read!("test/fixtures/tesla_mock/poll_modified.json")
+ body: File.read!("test/fixtures/tesla_mock/poll_modified.json"),
+ headers: HttpRequestMock.activitypub_object_headers()
})
updated_object = Object.get_by_id_and_maybe_refetch(object.id, interval: 100)
})
updated_object = Object.get_by_id_and_maybe_refetch(object.id, interval: 100)
@@
-387,7
+393,8
@@
defmodule Pleroma.ObjectTest do
mock_modified.(%Tesla.Env{
status: 200,
mock_modified.(%Tesla.Env{
status: 200,
- body: File.read!("test/fixtures/tesla_mock/poll_modified.json")
+ body: File.read!("test/fixtures/tesla_mock/poll_modified.json"),
+ headers: HttpRequestMock.activitypub_object_headers()
})
updated_object = Object.get_by_id_and_maybe_refetch(object.id, interval: -1)
})
updated_object = Object.get_by_id_and_maybe_refetch(object.id, interval: -1)