@@ -2,12 +2,12 @@ defmodule SecureRandomTest do
22 use ExUnit.Case
33
44 test "base64/1 returns a Binary string" do
5- assert is_binary ( SecureRandom . base64 )
5+ assert is_binary ( SecureRandom . base64 ( ) )
66 end
77
88 test "base64/1 defaults to a byte size of 16" do
9- #the result of base64 encoding should be 33% larger
10- assert 24 == byte_size ( SecureRandom . base64 )
9+ # the result of base64 encoding should be 33% larger
10+ assert 24 == byte_size ( SecureRandom . base64 ( ) )
1111 end
1212
1313 test "base64/1 successfully takes a byte_length" do
@@ -16,31 +16,31 @@ defmodule SecureRandomTest do
1616
1717 test "hex/1 defaults to a byte size of 16" do
1818 # The byte size of the resulting string is twice as large
19- assert 32 == byte_size ( SecureRandom . hex )
19+ assert 32 == byte_size ( SecureRandom . hex ( ) )
2020 end
2121
2222 test "hex/1 successfully takes a byte length" do
2323 assert 12 == byte_size ( SecureRandom . hex ( 6 ) )
2424 end
2525
2626 test "urlsafe_base64/1 returns a Binary string" do
27- assert is_binary ( SecureRandom . urlsafe_base64 )
27+ assert is_binary ( SecureRandom . urlsafe_base64 ( ) )
2828 end
2929
3030 test "urlsafe_base64/1 defaults to a string length of 22" do
31- assert 32 == String . length ( SecureRandom . urlsafe_base64 )
31+ assert 32 == String . length ( SecureRandom . urlsafe_base64 ( ) )
3232 end
3333
3434 test "urlsafe_base64/1 takes a byte_length" do
3535 assert 12 == String . length ( SecureRandom . urlsafe_base64 ( 4 ) )
3636 end
3737
3838 test "uuid/0 returns a Binary string" do
39- assert is_binary ( SecureRandom . uuid )
39+ assert is_binary ( SecureRandom . uuid ( ) )
4040 end
4141
4242 test "uuid/0 represents the UUIDv4 standard" do
4343 # that standard is 128 bit string 4byte-2byte-2byte-2byte-6byte
44- assert Regex . match? ( ~r/ \A \w {8}-\w {4}-4\w {3}-(8|9|a|b)\w {3}-\w {12}\z / , SecureRandom . uuid )
44+ assert Regex . match? ( ~r/ \A \w {8}-\w {4}-4\w {3}-(8|9|a|b)\w {3}-\w {12}\z / , SecureRandom . uuid ( ) )
4545 end
4646end
0 commit comments