zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

commit d9b5c84abadfb112f56f5b9fb500063b6670cfb2
parent 1ec3042ecb11b6421d76353d89c627e582bea115
Author: srfsh <dev@srf.sh>
Date:   Mon, 22 Aug 2022 08:48:16 +0300

Zenflows{Test,}.VF.Validate: compatibility improvement

Using multiplication instead of taking power is better here,
since we don't use the new power operator anywhere else.

Diffstat:
Msrc/zenflows/vf/validate.ex | 2+-
Mtest/vf/validate.test.exs | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/zenflows/vf/validate.ex b/src/zenflows/vf/validate.ex @@ -77,7 +77,7 @@ def uri(cset, field) do end) end -@mebibyte 1024**2 +@mebibyte 1024 * 1024 @doc """ Check if the given base64-encoded binary data is at least 1B, at most diff --git a/test/vf/validate.test.exs b/test/vf/validate.test.exs @@ -150,7 +150,7 @@ describe "img/2" do test "with too long param" do assert %Changeset{errors: errs} = - %{img: String.duplicate("a", 25 * 1024**2 + 1)} + %{img: String.duplicate("a", 25 * 1024 * 1024 + 1)} |> img_chgset() |> Validate.img(:img)