test for Pleroma.Web.CommonAPI.Utils.get_by_id_or_ap_id

This commit is contained in:
Maksim 2019-07-31 18:35:15 +00:00 committed by kaniini
commit 6eb33e7303
4 changed files with 41 additions and 1 deletions

View file

@ -39,4 +39,9 @@ defmodule Pleroma.FlakeIdTest do
assert dump(flake_s) == {:ok, flake}
assert dump(flake) == {:ok, flake}
end
test "is_flake_id?/1" do
assert is_flake_id?("9eoozpwTul5mjSEDRI")
refute is_flake_id?("http://example.com/activities/3ebbadd1-eb14-4e20-8118-b6f79c0c7b0b")
end
end