pinchflat/test/pinchflat/filesystem/filesystem_data_worker_test.exs
Kieran 33baa99aae Refactor modules into contexts (#78)
* [WIP] break out a few contexts, start refactoring fast index modules

* [WIP] more contexts, this time around slow indexing and downloads

* [WIP] got all tests passing

* [WIP] Added moduledocs

* Built a genserver to rename old jobs on boot

* Added a module naming check; moved things around

* Fixed specs
2024-03-12 17:54:55 -07:00

19 lines
478 B
Elixir

defmodule Pinchflat.Filesystem.FilesystemDataWorkerTest do
use Pinchflat.DataCase
import Pinchflat.MediaFixtures
alias Pinchflat.Filesystem.FilesystemDataWorker
describe "perform/1" do
test "Computes and stores the media file size" do
media_item = media_item_with_attachments()
refute media_item.media_size_bytes
perform_job(FilesystemDataWorker, %{id: media_item.id})
assert Repo.reload!(media_item).media_size_bytes
end
end
end