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
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
serializers/activitypub
services Fix processing mentions to domains with non-ascii TLDs ()
support
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
spec_helper.rb