Add basic test for Records.Cover module

This commit is contained in:
Claudio Ortolina
2024-11-29 22:08:40 +00:00
parent d9773bf45d
commit cf51cab7ce
2 changed files with 15 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
defmodule MusicLibrary.Records.CoverTest do
use ExUnit.Case, async: true
import MusicLibrary.RecordsFixtures
describe "resize/1" do
test "it resizes to the desired size" do
cover_data = File.read!(marbles_cover_fixture())
{:ok, resized_cover} = MusicLibrary.Records.Cover.resize(cover_data)
assert cover_data !== resized_cover
assert MusicLibrary.Records.Cover.correct_size?(resized_cover)
end
end
end