From c9b3fcc1d3371b637ddd56498ea2e8ae84c04f29 Mon Sep 17 00:00:00 2001 From: Floatingghost Date: Wed, 30 Oct 2024 14:43:18 +0000 Subject: [PATCH] allow for OTP code changes in :zip --- test/pleroma/emoji/pack_test.exs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/pleroma/emoji/pack_test.exs b/test/pleroma/emoji/pack_test.exs index 3843add13..049f27a92 100644 --- a/test/pleroma/emoji/pack_test.exs +++ b/test/pleroma/emoji/pack_test.exs @@ -64,7 +64,10 @@ test "returns error when zip file is bad", %{pack: pack} do path: Path.absname("test/instance_static/emoji/test_pack/blank.png") } - assert Pack.add_file(pack, nil, nil, file) == {:error, :bad_eocd} + # this varies by erlang OTP + possible_error_codes = [:bad_eocd, :einval] + {:error, code} = Pack.add_file(pack, nil, nil, file) + assert Enum.member?(possible_error_codes, code) end test "returns pack when zip file is empty", %{pack: pack} do