Refactor the test for SafeString.

This commit is contained in:
2024-09-05 12:04:13 +03:00
parent 00467d249a
commit 158dcce49b
@@ -7,11 +7,10 @@ defmodule LinkShortener.Generators.SafeStringTest do
test "generate/1 returns random safe string with same length" do
for expected_length <- @lengths do
length = expected_length
assert ^expected_length =
expected_length
|> SafeString.generate()
|> String.length()
assert length = expected_length
end
end
end