mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
Test FgCrypto
This commit is contained in:
17
apps/fg_http/test/fg_http/util/fg_crypto_test.exs
Normal file
17
apps/fg_http/test/fg_http/util/fg_crypto_test.exs
Normal file
@@ -0,0 +1,17 @@
|
||||
defmodule FgHttp.Util.FgCryptoTest do
|
||||
use ExUnit.Case, async: true
|
||||
|
||||
alias FgHttp.Util.FgCrypto
|
||||
|
||||
describe "rand_string" do
|
||||
test "it returns a string of default length" do
|
||||
assert 16 == String.length(FgCrypto.rand_string())
|
||||
end
|
||||
|
||||
test "it returns a string of proper length" do
|
||||
for length <- [1, 32, 32_768] do
|
||||
assert length == String.length(FgCrypto.rand_string(length))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user