Skip to content

Commit 1749809

Browse files
committed
Add tests for metadata minimization when no exif
1 parent d71edab commit 1749809

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/exif_test.exs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,14 @@ defmodule Image.ExitTest do
2323

2424
assert {:ok, %{copyright: nil, image_description: nil}} = Image.exif(image)
2525
end
26+
27+
test "No exif data" do
28+
image = Image.new!(10, 10)
29+
assert {:error, "No such field"} = Image.exif(image)
30+
end
31+
32+
test "Minimizing metadata on an image with no exif" do
33+
image = Image.new!(10, 10)
34+
assert {:ok, _image} = Image.minimize_metadata(image)
35+
end
2636
end

0 commit comments

Comments
 (0)