mastodon/spec/models
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
..
admin Add account sensitized ()
concerns Fix followers synchronization mechanism not working when URI has empty path ()
form Change deletes to preserve soft-deleted statuses in unresolved reports ()
web Add `policy` param to `POST /api/v1/push/subscriptions` ()
account_alias_spec.rb Add account migration UI ()
account_conversation_spec.rb Add conversations API ()
account_deletion_request_spec.rb Change account suspensions to be reversible by default ()
account_domain_block_spec.rb
account_filter_spec.rb Fix admins being able to suspend their instance actor ()
account_migration_spec.rb Add account migration UI ()
account_moderation_note_spec.rb
account_spec.rb Remove subscription_expires_at leftover from OStatus ()
account_statuses_cleanup_policy_spec.rb Add feature to automatically delete old toots ()
announcement_mute_spec.rb Add announcements ()
announcement_reaction_spec.rb Add announcements ()
announcement_spec.rb Add announcements ()
backup_spec.rb
block_spec.rb
canonical_email_block_spec.rb Add canonical e-mail blocks for suspended accounts ()
conversation_mute_spec.rb
conversation_spec.rb Revert "Remove conversation URI ()" ()
custom_emoji_category_spec.rb Add categories for custom emojis ()
custom_emoji_filter_spec.rb Add specs for CustomEmojiFilter ()
custom_emoji_spec.rb Make custom emoji domains case insensitive ()
custom_filter_spec.rb
device_spec.rb Add E2EE API ()
domain_allow_spec.rb Add whitelist mode ()
domain_block_spec.rb Allow blocking TLDs, and fix TLD blocks not being editable ()
email_domain_block_spec.rb
encrypted_message_spec.rb Add E2EE API ()
export_spec.rb Export and import show_reblogs together with following list ()
favourite_spec.rb
featured_tag_spec.rb Add featured hashtags to profiles ()
follow_recommendation_suppression_spec.rb Add cold-start follow recommendations ()
follow_request_spec.rb Fix edge case where accepted follow cannot be processed because of follow limit ()
follow_spec.rb Fix follow limit preventing re-following of a moved account ()
home_feed_spec.rb Fix performance of home feed regeneration ()
identity_spec.rb Add spec for Identity.find_for_oauth ()
import_spec.rb Fix follow limit preventing re-following of a moved account ()
invite_spec.rb Change account suspensions to be reversible by default ()
ip_block_spec.rb Add IP-based rules ()
list_account_spec.rb
list_spec.rb
login_activity_spec.rb Add authentication history ()
marker_spec.rb Add timeline read markers API ()
media_attachment_spec.rb Fix media attachment size validation not correctly accounting for file type ()
mention_spec.rb
mute_spec.rb
notification_spec.rb Improved performance of notification preloading ()
one_time_key_spec.rb Add E2EE API ()
poll_spec.rb Add polls ()
poll_vote_spec.rb Implement pending tests ()
preview_card_spec.rb
public_feed_spec.rb Refactor how public and tag timelines are queried ()
relationship_filter_spec.rb Fix followings list order | Issue ()
relay_spec.rb
remote_follow_spec.rb Fix uncaught domain normalization error in remote follow ()
report_filter_spec.rb
report_spec.rb Bump faker from 1.9.6 to 2.1.0 and update faker api ()
rule_spec.rb Add server rules ()
scheduled_status_spec.rb Add scheduled statuses ()
session_activation_spec.rb Add Ruby 3.0 support ()
setting_spec.rb Update Mastodon to Rails 6.1 ()
site_upload_spec.rb
status_pin_spec.rb
status_spec.rb Refactor how public and tag timelines are queried ()
status_stat_spec.rb Extract counters from accounts table to account_stats table ()
system_key_spec.rb Add E2EE API ()
tag_feed_spec.rb Fix typo in tag_feed_spec.rb ()
tag_spec.rb Improve tag search query ()
trending_tags_spec.rb Change trending hashtags to be affected be reblogs ()
unavailable_domain_spec.rb Change delivery failure tracking to work with hostnames instead of URLs ()
user_invite_request_spec.rb Add "why do you want to join" field to invite requests ()
user_spec.rb Add ability to skip sign-in token authentication for specific users ()
webauthn_credentials_spec.rb Fix validates :sign_count of WebauthnCredential ()