Assertions on the files a test stored, with Storehouse.Memory:
import Storehouse.Test
test "an avatar is stored, and the old one deleted", %{user: user} do
{:ok, user} = Accounts.update_avatar(user, upload)
assert_stored user.avatar.key
refute_stored "avatars/old.png"
assert [%{key: "avatars/" <> _}] = stored_files()
endEach sees only the files of the calling test (see Storehouse.Memory's
checkout).
Summary
Functions
Asserts that a file is stored under key, or under a key that matches a
regex. Gives the key.
Asserts that no file is stored under key, or under a key that matches a regex.
The files stored, in the order of their keys: each with its :key, :body, :content_type and :modified_at.
Functions
Asserts that a file is stored under key, or under a key that matches a
regex. Gives the key.
Asserts that no file is stored under key, or under a key that matches a regex.
@spec stored_files() :: [map()]
The files stored, in the order of their keys: each with its :key, :body, :content_type and :modified_at.