about summary refs log tree commit diff
path: root/spec/services/post_status_service_spec.rb
AgeCommit message (Collapse)Author
2023-02-22Enable Style/FrozenStringLiteralComment for specs (#23790)Nick Schonning
2023-02-20Autofix Rubocop RSpec/BeEq (#23740)Nick Schonning
2023-02-20Enable Rubocop RSpec/NotToNot (#23723)Nick Schonning
2023-02-19Autofix Rubocop Style/StringLiterals (#23695)Nick Schonning
2023-02-18Autofix Rubocop Style/TrailingCommaInArguments (#23694)Nick Schonning
2023-02-17Autofix Rubocop Style/NestedParenthesizedCalls (#23646)Nick Schonning
2023-02-13Add API parameter to safeguard unexpect mentions in new posts (#18350)Claire
2021-10-14Fix scheduled statuses decreasing statuses counts (#16791)Claire
* Add tests * Fix scheduled statuses decreasing statuses counts Fixes #16774
2020-03-25Fix media not being marked sensitive when client sets a CW but no text (#13277)ThibG
Mastodon enforces the “sensitive” flag on media attachments whenever a toot is posted with a Content Warning. However, it does so *after* potentially converting the Content Warning to toot text (when there is no toot text), which leads to inconsistent and surprising behavior for API clients. This commit fixes this inconsistency.
2020-01-23Fix media attachments without file being uploadable (#12562)Eugen Rochko
Fix #12554
2019-07-06Remove Salmon and PubSubHubbub (#11205)Eugen Rochko
* Remove Salmon and PubSubHubbub endpoints * Add error when trying to follow OStatus accounts * Fix new accounts not being created in ResolveAccountService
2019-01-26Prevent posting toots with media attachments from someone else (#9921)ThibG
2019-01-21Fix scheduled toot with media immediately creating a toot (#9894)ThibG
* Add test for not persisting status when attaching media to scheduled toot * Prevent status used for validation from being persisted to the database Fixes #9893 Thanks to tateisu for the help investigating this.
2019-01-05Add scheduled statuses (#9706)Eugen Rochko
Fix #340
2018-12-24Limit maximum visibility of local silenced users to unlisted (#9583)ThibG
Fixes #9580
2018-11-25Ensure replied-to is a status not a boost (#9129)valerauko
* Ensure replied-to is a status not a boost * Consider case of not a reply * Add test case for replying to boost * Move reblog-reply resolution to model * Remove unnecessary comment
2018-05-02Slightly reduce RAM usage (#7301)Eugen Rochko
* No need to re-require sidekiq plugins, they are required via Gemfile * Add derailed_benchmarks tool, no need to require TTY gems in Gemfile * Replace ruby-oembed with FetchOEmbedService Reduce startup by 45382 allocated objects * Remove preloaded JSON-LD in favour of caching HTTP responses Reduce boot RAM by about 6 MiB * Fix tests * Fix test suite by stubbing out JSON-LD contexts
2017-12-06Using double splat operator (#5859)Yamagishi Kazutoshi
2017-09-16Fix filterable_languages method of SettingsHelper (#4966)Akihiko Odaki
2017-08-13ActivityPub delivery (#4566)Eugen Rochko
* Deliver ActivityPub Like * Deliver ActivityPub Undo-Like * Deliver ActivityPub Create/Announce activities * Deliver ActivityPub creates from mentions * Deliver ActivityPub Block/Undo-Block * Deliver ActivityPub Accept/Reject-Follow * Deliver ActivityPub Undo-Follow * Deliver ActivityPub Follow * Deliver ActivityPub Delete activities Incidentally fix #889 * Adjust BatchedRemoveStatusService for ActivityPub * Add tests for ActivityPub workers * Add tests for FollowService * Add tests for FavouriteService, UnfollowService and PostStatusService * Add tests for ReblogService, BlockService, UnblockService, ProcessMentionsService * Add tests for AuthorizeFollowService, RejectFollowService, RemoveStatusService * Add tests for BatchedRemoveStatusService * Deliver updates to a local account to ActivityPub followers * Minor adjustments
2017-04-25Fix #2402 - Add Idempotency-Key header to PostStatusService that prevents ↵Eugen Rochko
(#2419) duplicates. Web UI regenerates UUID for that header every time the compose form is changed or successfully submitted Also, fix Farsi i18n overwriting the English one
2017-04-18Language detection refactor (#2099)Matt Jankowski
* Extract detect_language to separate class * Use default locale, not just en * Add spec to confirm that whatlanguage cant identify empty string * Allow account locale to override default in language detector * PostStatusService supplies an account to detect language
2017-04-07Use I18n for media attachment validation errorsChad Pytel
These are currently user facing errors, but are not localized. This adds the ability for these messages to be localized.
2017-04-07Add specs for PostStatusServiceChad Pytel
This implements all pending specs, and adds additional coverage for the following functionality: * Normal status creation * Creating a reply status * Creating a sensitive status * Creating a status with spoiler text * A status with no spoiler text gets an empty string for spoiler text * Creating a status with custom visibility * Creating a status for an application * Processing mentions * Processing Hashtags * Pinging PuSH hubs * Crawling links * Attaching media
2017-04-07Add specs for media attachment validationsChad Pytel
There are currently not specs for the two media validations that are performed by `PostStatusService`. This adds specs for the validations that ensure that you cannot attach more than four files, and that a status cannot have both image and video attachments.
2016-03-05Fixing some bugs, adding pending test examplesEugen Rochko
2016-02-25Adding a Mention model, test stubsEugen Rochko