class
ActiveStorage::VariantProcessedTest
- ActiveStorage::VariantProcessedTest
- Minitest::Test
- Minitest::Runnable
- Reference
- Object
Overview
The write path: a variation nothing has stored is transformed and uploaded under Variant#key,
which is the layout a Rails app with config.active_storage.track_variants off writes.
The Disk service is used rather than the presigning S3 one above, because these cases read back what was actually stored. No row is written in this layout, so no database is needed either. :nodoc:
Defined in:
active_storage/variant_test.crConstant Summary
-
AVATAR_PATH =
(Path["/woodpecker/src/codeberg.org/miry/marten-rails-bridge/src/active_storage"].join("../../examples/demo/src/assets/images/avatar.jpg")).normalize.to_s -
The 1600x1200 image the demo serves, committed next to it.
-
BLOB_KEY =
"gz0zdzhk0yn6zjhxfzl6qt1ys5rj"
Instance Method Summary
- #setup
- #teardown
- #test_processed_does_not_process_again
-
#test_processed_does_not_process_what_another_request_stored
A second
ActiveStorage::Variantfor the same variation finds the object of the first one. -
#test_processed_encodes_the_variation_format
The source is a JPEG, so a png variation proves the saver the variation names is the one that ran, rather than the source format being passed through.
- #test_processed_is_false_until_the_image_is_stored
- #test_processed_raises_for_an_operation_the_processor_does_not_implement
- #test_processed_raises_when_the_source_is_not_stored
-
#test_processed_raises_without_a_processor_backend
An app that never assigned a backend.
-
#test_processed_resizes_the_source
The dimensions come from the bytes that were stored, not from the variation that asked for them.
- #test_processed_returns_itself
- #test_processed_stores_the_image_under_the_derived_key
Instance Method Detail
A second ActiveStorage::Variant for the same variation finds the object of the first one.
The source is a JPEG, so a png variation proves the saver the variation names is the one that ran, rather than the source format being passed through.
An app that never assigned a backend. The variation is fine, the deployment is not configured, so this is not a missing representation.
The dimensions come from the bytes that were stored, not from the variation that asked for them.