* [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
19 lines
478 B
Elixir
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
|