diff options
| author | Mark Felder <feld@FreeBSD.org> | 2020-07-10 11:34:53 -0500 |
|---|---|---|
| committer | Mark Felder <feld@FreeBSD.org> | 2020-07-10 11:34:53 -0500 |
| commit | 3c0c1fd2efa981f18091782434c1f0ac77462b8e (patch) | |
| tree | 7776233f9248d4e1caee6ad859af3a524347d926 /test/web/activity_pub/object_validators/follow_validation_test.exs | |
| parent | d7a37fddd1fc5169ae8c714d0baf8e5372a5f1d5 (diff) | |
| parent | ce9514000db1e08a69b8874f21e66261b9261d86 (diff) | |
| download | pleroma-3c0c1fd2efa981f18091782434c1f0ac77462b8e.tar.gz pleroma-3c0c1fd2efa981f18091782434c1f0ac77462b8e.zip | |
Merge branch 'develop' into issue/1790-updated-oban
Diffstat (limited to 'test/web/activity_pub/object_validators/follow_validation_test.exs')
| -rw-r--r-- | test/web/activity_pub/object_validators/follow_validation_test.exs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/web/activity_pub/object_validators/follow_validation_test.exs b/test/web/activity_pub/object_validators/follow_validation_test.exs new file mode 100644 index 000000000..6e1378be2 --- /dev/null +++ b/test/web/activity_pub/object_validators/follow_validation_test.exs @@ -0,0 +1,26 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + +defmodule Pleroma.Web.ActivityPub.ObjectValidators.FollowValidationTest do + use Pleroma.DataCase + + alias Pleroma.Web.ActivityPub.Builder + alias Pleroma.Web.ActivityPub.ObjectValidator + + import Pleroma.Factory + + describe "Follows" do + setup do + follower = insert(:user) + followed = insert(:user) + + {:ok, valid_follow, []} = Builder.follow(follower, followed) + %{follower: follower, followed: followed, valid_follow: valid_follow} + end + + test "validates a basic follow object", %{valid_follow: valid_follow} do + assert {:ok, _follow, []} = ObjectValidator.validate(valid_follow, []) + end + end +end |
