projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add include for the "Further reading" section
[akkoma]
/
test
/
conversation_test.exs
diff --git
a/test/conversation_test.exs
b/test/conversation_test.exs
index 3c54253e3c3c6eca60b3124c752aaf36e98efe79..359aa68403a413fc2488227c84d938c71b712e2f 100644
(file)
--- a/
test/conversation_test.exs
+++ b/
test/conversation_test.exs
@@
-11,14
+11,14
@@
defmodule Pleroma.ConversationTest do
import Pleroma.Factory
import Pleroma.Factory
-
clear_config_all
([:instance, :federating], true)
+
setup_all do: clear_config
([:instance, :federating], true)
test "it goes through old direct conversations" do
user = insert(:user)
other_user = insert(:user)
{:ok, _activity} =
test "it goes through old direct conversations" do
user = insert(:user)
other_user = insert(:user)
{:ok, _activity} =
- CommonAPI.post(user, %{
"visibility" => "direct", "status" =>
"hey @#{other_user.nickname}"})
+ CommonAPI.post(user, %{
visibility: "direct", status:
"hey @#{other_user.nickname}"})
Pleroma.Tests.ObanHelpers.perform_all()
Pleroma.Tests.ObanHelpers.perform_all()
@@
-46,7
+46,7
@@
defmodule Pleroma.ConversationTest do
test "public posts don't create conversations" do
user = insert(:user)
test "public posts don't create conversations" do
user = insert(:user)
- {:ok, activity} = CommonAPI.post(user, %{
"status" =>
"Hey"})
+ {:ok, activity} = CommonAPI.post(user, %{
status:
"Hey"})
object = Pleroma.Object.normalize(activity)
context = object.data["context"]
object = Pleroma.Object.normalize(activity)
context = object.data["context"]
@@
-62,7
+62,7
@@
defmodule Pleroma.ConversationTest do
tridi = insert(:user)
{:ok, activity} =
tridi = insert(:user)
{:ok, activity} =
- CommonAPI.post(har, %{
"status" => "Hey @#{jafnhar.nickname}", "visibility" =>
"direct"})
+ CommonAPI.post(har, %{
status: "Hey @#{jafnhar.nickname}", visibility:
"direct"})
object = Pleroma.Object.normalize(activity)
context = object.data["context"]
object = Pleroma.Object.normalize(activity)
context = object.data["context"]
@@
-81,9
+81,9
@@
defmodule Pleroma.ConversationTest do
{:ok, activity} =
CommonAPI.post(jafnhar, %{
{:ok, activity} =
CommonAPI.post(jafnhar, %{
-
"status" =>
"Hey @#{har.nickname}",
-
"visibility" =>
"direct",
-
"in_reply_to_status_id" =>
activity.id
+
status:
"Hey @#{har.nickname}",
+
visibility:
"direct",
+
in_reply_to_status_id:
activity.id
})
object = Pleroma.Object.normalize(activity)
})
object = Pleroma.Object.normalize(activity)
@@
-105,9
+105,9
@@
defmodule Pleroma.ConversationTest do
{:ok, activity} =
CommonAPI.post(tridi, %{
{:ok, activity} =
CommonAPI.post(tridi, %{
-
"status" =>
"Hey @#{har.nickname}",
-
"visibility" =>
"direct",
-
"in_reply_to_status_id" =>
activity.id
+
status:
"Hey @#{har.nickname}",
+
visibility:
"direct",
+
in_reply_to_status_id:
activity.id
})
object = Pleroma.Object.normalize(activity)
})
object = Pleroma.Object.normalize(activity)
@@
-149,14
+149,14
@@
defmodule Pleroma.ConversationTest do
jafnhar = insert(:user, local: false)
{:ok, activity} =
jafnhar = insert(:user, local: false)
{:ok, activity} =
- CommonAPI.post(har, %{
"status" => "Hey @#{jafnhar.nickname}", "visibility" =>
"direct"})
+ CommonAPI.post(har, %{
status: "Hey @#{jafnhar.nickname}", visibility:
"direct"})
{:ok, conversation} = Conversation.create_or_bump_for(activity)
assert length(conversation.participations) == 2
{:ok, activity} =
{:ok, conversation} = Conversation.create_or_bump_for(activity)
assert length(conversation.participations) == 2
{:ok, activity} =
- CommonAPI.post(har, %{
"status" => "Hey @#{jafnhar.nickname}", "visibility" =>
"public"})
+ CommonAPI.post(har, %{
status: "Hey @#{jafnhar.nickname}", visibility:
"public"})
assert {:error, _} = Conversation.create_or_bump_for(activity)
end
assert {:error, _} = Conversation.create_or_bump_for(activity)
end