You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mastodon/spec/services
Patrick Figel 8ac7fca5d0 Set correct attachment type for rejected media (#2599)
In #2110, a new attachment type "unknown" was introduced for
attachments that were rejected due to a domain being blocked using
reject_media. However, the "type" field was never set to "unknown"
because a default value of "0" (image) is set for that column,
causing the `type.blank?` expression to always equal false.

This version uses type_changed? instead, causing the type to be set
to "unknown" unless a type has been explicitly set. This introduces
a small change in behaviour causing the type to be set to unknown
before paperclip calls `before_post_process`. Presumably this
behaviour is more appropriate than the current one because the
attachment type has not been determined by that point.

Included are new tests for `ProcessFeedService` and
`UpdateRemoteProfileService` which now check that remote media is
downloaded for non-blocked domains and is rejected for others.
8 years ago
..
account_search_service_spec.rb Optimize account search (#2421) 8 years ago
authorize_follow_service_spec.rb Adding more unit tests. Fixing Salmon slaps XML 8 years ago
block_domain_service_spec.rb Domain block service cleanup (#2490) 8 years ago
block_service_spec.rb Adding more unit tests. Fixing Salmon slaps XML 8 years ago
fan_out_on_write_service_spec.rb Quick attempt to get pull requests passing 8 years ago
favourite_service_spec.rb Adding more unit tests. Fixing Salmon slaps XML 8 years ago
fetch_atom_service_spec.rb Fix #54 - Fetch remote accounts by URL from mentions 8 years ago
fetch_link_card_service_spec.rb OEmbed support for PreviewCard (#2337) 8 years ago
fetch_remote_account_service_spec.rb Fix #54 - Fetch remote accounts by URL from mentions 8 years ago
fetch_remote_status_service_spec.rb Fix #54 - Fetch remote accounts by URL from mentions 8 years ago
follow_remote_account_service_spec.rb Improve shared status verification (#2525) 8 years ago
follow_service_spec.rb Adding more unit tests. Fixing Salmon slaps XML 8 years ago
mute_service_spec.rb Mute button progress so far. WIP, doesn't entirely work correctly. 8 years ago
post_status_service_spec.rb Fix #2402 - Add Idempotency-Key header to PostStatusService that prevents (#2419) 8 years ago
precompute_feed_service_spec.rb Adding more test stubs 9 years ago
process_feed_service_spec.rb Set correct attachment type for rejected media (#2599) 8 years ago
process_interaction_service_spec.rb Stop trying to shoehorn all Salmon updates into the poor database-connected 8 years ago
process_mentions_service_spec.rb Fixing some bugs, adding pending test examples 9 years ago
reblog_service_spec.rb Removing external hub completely, fix #333 fixing digit-only hashtags, 8 years ago
reject_follow_service_spec.rb Adding more unit tests. Fixing Salmon slaps XML 8 years ago
send_interaction_service_spec.rb Fixing some bugs, adding pending test examples 9 years ago
unblock_service_spec.rb Adding more unit tests. Fixing Salmon slaps XML 8 years ago
unfollow_service_spec.rb Adding more unit tests. Fixing Salmon slaps XML 8 years ago
unmute_service_spec.rb Mute button progress so far. WIP, doesn't entirely work correctly. 8 years ago
update_remote_profile_service_spec.rb Set correct attachment type for rejected media (#2599) 8 years ago