logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: 7ddae61414a2e0f04560d2afe46dc51c5ac32c85
parent d95e1066b9858997c9137097bf00ddc2fa57e5e1
Author: Ekaterina Vaartis <vaartis@kotobank.ch>
Date:   Wed,  4 Jun 2025 12:25:06 +0300

Change the test that assumes that a hashtag with # will remain as-is

This does not seem to be the intended behaviour, as the code that produces it
did not actually ever do anything and just returned the tag as-is.

See
lib/pleroma/web/activity_pub/object_validators/tag_validator.ex
and
https://git.pleroma.social/pleroma/pleroma/-/merge_requests/4358#note_112681

At least Mastodon and Misskey output tags without the # from their API,
so in reality tags with the hash should rarely happen.

Diffstat:

Mtest/pleroma/web/activity_pub/transmogrifier/note_handling_test.exs2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/pleroma/web/activity_pub/transmogrifier/note_handling_test.exs b/test/pleroma/web/activity_pub/transmogrifier/note_handling_test.exs @@ -200,7 +200,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.NoteHandlingTest do assert match?( %{ "href" => "http://mastodon.example.org/tags/moo", - "name" => "#moo", + "name" => "moo", "type" => "Hashtag" }, Enum.at(object.data["tag"], 1)