summaryrefslogtreecommitdiff
path: root/test/pleroma/migration_helper/object_id_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/pleroma/migration_helper/object_id_test.exs')
-rw-r--r--test/pleroma/migration_helper/object_id_test.exs15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/pleroma/migration_helper/object_id_test.exs b/test/pleroma/migration_helper/object_id_test.exs
new file mode 100644
index 000000000..ddd2cfbd4
--- /dev/null
+++ b/test/pleroma/migration_helper/object_id_test.exs
@@ -0,0 +1,15 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.MigrationHelper.ObjectIdTest do
+ use Pleroma.DataCase, async: true
+ alias Pleroma.MigrationHelper.ObjectId
+
+ test "flake_from_time/1" do
+ now = NaiveDateTime.utc_now()
+ id = ObjectId.flake_from_time(now)
+
+ assert FlakeId.flake_id?(id)
+ end
+end