aboutsummaryrefslogtreecommitdiff
path: root/test/pleroma/web/common_api
diff options
context:
space:
mode:
authorLain Soykaf <lain@soykaf.club>2021-01-28 09:33:30 +0100
committerLain Soykaf <lain@soykaf.club>2021-01-28 09:33:30 +0100
commitd18ba133b2db3d6af05cce191c5ea0c200b57346 (patch)
treeaac2e5fa108474fc8b2e369647075ab1a506b9b4 /test/pleroma/web/common_api
parent633d0286b3cecc5140490b3a27e2732f98e012c5 (diff)
downloadpleroma-groups.tar.gz
Groups: Basic group validation.groups
Diffstat (limited to 'test/pleroma/web/common_api')
-rw-r--r--test/pleroma/web/common_api/group_messaging_test.exs25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/pleroma/web/common_api/group_messaging_test.exs b/test/pleroma/web/common_api/group_messaging_test.exs
new file mode 100644
index 000000000..2509428ae
--- /dev/null
+++ b/test/pleroma/web/common_api/group_messaging_test.exs
@@ -0,0 +1,25 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.CommonAPI.GroupMessagingTest do
+ use Pleroma.DataCase
+
+ import Pleroma.Factory
+
+ alias Pleroma.Group
+ alias Pleroma.Web.CommonAPI
+
+ describe "Group chats" do
+ test "local chat" do
+ user = insert(:user)
+
+ {:ok, group_creation_activity} =
+ CommonAPI.create_group(user, %{name: "cofe", description: "for cofe enthusiasts"})
+
+ group = Group.get_for_object(group_creation_activity)
+
+ assert group
+ end
+ end
+end