Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85648789
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/test/flake_id/ecto/type_test.exs b/test/flake_id/ecto/type_test.exs
index 4663852..d73792c 100644
--- a/test/flake_id/ecto/type_test.exs
+++ b/test/flake_id/ecto/type_test.exs
@@ -1,30 +1,34 @@
defmodule FlakeID.Ecto.TypeTest do
use ExUnit.Case, async: true
alias FlakeID.Ecto.Type
@flake_string "9n2ciuz1wdesFnrGJU"
@flake_binary <<0, 0, 1, 109, 67, 124, 251, 125, 95, 28, 30, 59, 36, 42, 0, 0>>
test "cast/1" do
assert Type.cast(@flake_binary) == {:ok, @flake_string}
assert Type.cast(@flake_string) == {:ok, @flake_string}
end
test "load/1" do
assert Type.load(@flake_binary) == {:ok, @flake_string}
assert Type.load(@flake_string) == {:ok, @flake_string}
end
test "dump/1" do
assert Type.dump(@flake_string) == {:ok, @flake_binary}
assert Type.dump(@flake_binary) == {:ok, @flake_binary}
end
+ test "equal?/2" do
+ assert Type.equal?(@flake_binary, @flake_binary) == true
+ end
+
test "autogenerate/0" do
flake = Type.autogenerate()
assert String.valid?(flake)
assert FlakeID.flake_id?(flake)
end
end
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Aug 28, 7:57 PM (21 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1735913
Default Alt Text
(1 KB)
Attached To
Mode
R17 flake_id
Attached
Detach File
Event Timeline
Log In to Comment