logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

utils_test.exs (553B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2023 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Web.ActivityPub.MRF.UtilsTest do
  5. use Pleroma.DataCase, async: true
  6. alias Pleroma.Web.ActivityPub.MRF.Utils
  7. describe "describe_regex_or_string/1" do
  8. test "describes regex" do
  9. assert "~r/foo/i" == Utils.describe_regex_or_string(~r/foo/i)
  10. end
  11. test "returns string as-is" do
  12. assert "foo" == Utils.describe_regex_or_string("foo")
  13. end
  14. end
  15. end