mastodon/spec
Claire 84ceebe1c4
Fix media attachment size validation not correctly accounting for file type ()
* Fix media attachment size validation not correctly accounting for file type

Fixes a regression introduced in  caused by the fact that kt-paperclip
now correctly runs validations before processing, meaning that file size
verification could not rely on our before_post_processing hook.

Moved the `before_post_processing` hooks to `before_validate` to make sure
the media attachment type is set correctly before the file gets validated.

* Add tests
..
controllers Fix webauthn secure key authentication ()
fabricators Add feature to automatically delete old toots ()
features Add submit button to the top of preferences pages ()
fixtures Switch from unmaintained paperclip to kt-paperclip ()
helpers Change RTL detection to rely on unicode-bidi paragraph by paragraph ()
lib Change routing paths to use usernames in web UI ()
mailers Add Ruby 3.0 support ()
models Fix media attachment size validation not correctly accounting for file type ()
policies Add support for reversible suspensions through ActivityPub ()
presenters Change references to tootsuite/mastodon to mastodon/mastodon ()
requests Further preparation for Rails 6 ()
routing Move create/destroy actions for api/v1/statuses to namespace ()
serializers/activitypub Fix account URI in UpdatePollSerializer ()
services Fix processing mentions to domains with non-ascii TLDs ()
support Fix base64-encoded file uploads not being possible ()
validators Add canonical e-mail blocks for suspended accounts ()
views Change references to tootsuite/mastodon to mastodon/mastodon ()
workers Fix followers synchronization mechanism not working when URI has empty path ()
rails_helper.rb Add WebAuthn as an alternative 2FA method ()
spec_helper.rb Move rspec examples to tmp dir ()