projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fetcher_test: Remove assert on fake Create having an ap_id
[akkoma]
/
test
/
pleroma
/
web
/
activity_pub
/
object_validators
/
chat_validation_test.exs
diff --git
a/test/pleroma/web/activity_pub/object_validators/chat_validation_test.exs
b/test/pleroma/web/activity_pub/object_validators/chat_validation_test.exs
index 16e4808e59708e415dba4ec59ffe8807befdae1b..320854187d753d57034d3e229d31f412f8be70b0 100644
(file)
--- a/
test/pleroma/web/activity_pub/object_validators/chat_validation_test.exs
+++ b/
test/pleroma/web/activity_pub/object_validators/chat_validation_test.exs
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.ObjectValidators.ChatValidationTest do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.ObjectValidators.ChatValidationTest do
@@
-17,7
+17,7
@@
defmodule Pleroma.Web.ActivityPub.ObjectValidators.ChatValidationTest do
user = insert(:user)
recipient = insert(:user)
{:ok, activity} = CommonAPI.post_chat_message(user, recipient, "hey")
user = insert(:user)
recipient = insert(:user)
{:ok, activity} = CommonAPI.post_chat_message(user, recipient, "hey")
- object = Object.normalize(activity, false)
+ object = Object.normalize(activity, f
etch: f
alse)
{:ok, create_data, _} = Builder.create(user, object.data, [recipient.ap_id])
{:ok, create_data, _} = Builder.create(user, object.data, [recipient.ap_id])
@@
-77,7
+77,7
@@
defmodule Pleroma.Web.ActivityPub.ObjectValidators.ChatValidationTest do
user: user
} do
file = %Plug.Upload{
user: user
} do
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"
}
@@
-98,7
+98,7
@@
defmodule Pleroma.Web.ActivityPub.ObjectValidators.ChatValidationTest do
user: user
} do
file = %Plug.Upload{
user: user
} do
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"
}
@@
-119,7
+119,7
@@
defmodule Pleroma.Web.ActivityPub.ObjectValidators.ChatValidationTest do
user: user
} do
file = %Plug.Upload{
user: user
} do
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"
}
@@
-149,7
+149,7
@@
defmodule Pleroma.Web.ActivityPub.ObjectValidators.ChatValidationTest do
test "does not validate if the message is longer than the remote_limit", %{
valid_chat_message: valid_chat_message
} do
test "does not validate if the message is longer than the remote_limit", %{
valid_chat_message: valid_chat_message
} do
-
Pleroma.Config.put
([:instance, :remote_limit], 2)
+
clear_config
([:instance, :remote_limit], 2)
refute match?({:ok, _object, _meta}, ObjectValidator.validate(valid_chat_message, []))
end
refute match?({:ok, _object, _meta}, ObjectValidator.validate(valid_chat_message, []))
end