2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-03-03 22:05:52 +08:00
discourse/spec/lib
Natalie Tay 2a085cad2c
FIX: Ensure post_created event fires even if topic_created event hooks have exceptions (#38146)
Currently, if `on(:topic_created)` has an error, all subsequent triggers
like `on(:post_created)` would not be triggered. 😱

This PR ensures post created registered event hooks will also trigger
even if the topic created ones fail. Events being rescued are outside of
topic and post creation transactions.
2026-03-03 19:38:50 +08:00
..
active_support_type_extensions DEV: Add symbol to ActiveModel attribute types (#36420) 2025-12-03 10:57:44 +01:00
auth UX: Remove Bootstrap Mode (#37694) 2026-02-17 16:46:32 -03:00
backup_restore DEV: Rename Backuper to Creator 2026-01-22 18:46:02 +00:00
common_passwords DEV: Fix various spec linting issues (#24672) 2023-12-04 13:45:19 +01:00
compression
concern DEV: Rename SecureSession to ServerSession 2025-09-18 16:31:03 +02:00
content_security_policy FIX: invalid CSP directive sources should allow site to boot with valid CSP directives (#31256) 2025-02-10 20:38:36 +08:00
demon DEV: Remove IMAP support in Discourse (#37002) 2026-01-12 10:07:26 +10:00
discourse_webauthn DEV: Rename SecureSession to ServerSession 2025-09-18 16:31:03 +02:00
email FEATURE: Add recipient_username interpolation key for email templates (#38096) 2026-02-27 17:18:02 +01:00
file_store FIX: Return file paths from FileStore download methods (#37760) 2026-02-17 11:56:50 +01:00
final_destination SECURITY: Add FastImage SSRF safe freedom patch 2024-07-03 20:49:15 +08:00
freedom_patches DEV: Monkey patch a from_described_class helper in RSpec::Mocks (#34021) 2025-08-05 12:03:42 +10:00
guardian Revert "FIX: Add server-side trust level check for delete all posts (… (#38094) 2026-02-26 21:17:39 +01:00
highlight_js
i18n FIX: incorrect Breton plural rule logic operator (#37545) 2026-02-05 18:04:59 +11:00
import
middleware DEV: Fix AnonymousCache for pitchfork in dev/test modes (#37852) 2026-02-17 09:12:02 +00:00
migration FIX: Add table_schema filter to mark_readonly default check (#37037) 2026-01-10 21:57:31 +01:00
onebox FEATURE: Add Reddit OAuth support for onebox (#38040) 2026-02-25 10:44:32 -03:00
plugin FIX: Restore plugin data attributes on script tags lost in #37763 (#38039) 2026-02-26 15:21:44 -03:00
pretty_text DEV: add tag hashtag data source style type (#33289) 2025-06-20 18:08:47 +04:00
rate_limiter
release_utils DEV: Bump latest branch version on security fixes (#37774) 2026-02-26 11:10:55 +01:00
reviewable FIX: ensure remove_reviewable_ids is always an array (#37131) 2026-01-15 10:35:59 +08:00
scheduler DEV: Double timeout for spec in spec/defer_spec.rb (#35368) 2025-10-14 17:13:26 +08:00
second_factor FIX: URL encode usernames in grant admin redirect (#34664) 2025-10-13 09:49:23 +08:00
seed_data DEV: Deprecate the assignment of nil to site settings (#36093) 2025-12-01 15:04:23 +08:00
service DEV: Fix the lock step when using contracts (#38019) 2026-02-24 12:30:38 +01:00
sidekiq FIX: Ensure retry_count is set when checking if a job is being retried (#36034) 2025-11-14 14:18:50 +11:00
site_settings FEATURE: Filter settings by depends_on and link from upcoming changes (#37560) 2026-02-10 13:00:05 +10:00
stylesheet DEV: Rename theme-transpiler to asset-processor (#35498) 2025-10-20 14:16:46 +01:00
svg_sprite FIX: Return file paths from FileStore download methods (#37760) 2026-02-17 11:56:50 +01:00
theme_settings_manager DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
theme_store FEATURE: Theme settings migrations (#24071) 2023-11-02 08:10:15 +03:00
topic_query DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
turbo_tests/flaky DEV: Include exception details for each test in flaky tests report (#24892) 2023-12-14 11:11:11 +08:00
validators DEV: clean up splash SVG on upload, not when rendering (#37681) 2026-02-16 13:14:35 +10:00
wizard UX: One step wizard (#36082) 2025-11-25 13:35:32 -05:00
admin_confirmation_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
admin_user_index_query_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
archetype_spec.rb DEV: Catch missing translations during test runs (#26258) 2024-05-24 22:15:53 +08:00
asset_processor_spec.rb DEV: Rename theme-transpiler to asset-processor (#35498) 2025-10-20 14:16:46 +01:00
bookmark_manager_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
bookmark_query_spec.rb FIX: Respect permissions when counting bookmarks in user summary (#36856) 2026-01-21 16:34:55 +01:00
bookmark_reminder_notification_handler_spec.rb FIX: don't clear reminder on deleted bookmarks (#35987) 2025-11-12 17:47:07 +01:00
bookmarks_bulk_action_spec.rb FIX: BookmarksBulkAction#delete passing integer to guardian instead of Bookmark object (#37871) 2026-02-17 15:14:46 +10:00
browser_detection_spec.rb
cache_spec.rb DEV: fix a large amount of typos (#37428) 2026-02-02 16:31:58 +11:00
category_badge_spec.rb FIX: email category badges shouldn't use category text color (#25655) 2024-02-13 10:18:36 -05:00
category_guardian_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
color_math_spec.rb
composer_messages_finder_spec.rb FIX: Enforce Guardian checks in ComposerMessagesFinder (#38005) 2026-02-25 11:45:42 +08:00
content_buffer_spec.rb
content_localization_spec.rb FEATURE: Show localized tags (#37044) 2026-02-12 18:06:14 +08:00
content_security_policy_spec.rb DEV: Remove CSP report collection endpoint and setting (#37903) 2026-02-19 08:51:32 -05:00
cooked_post_processor_spec.rb FIX: skip image dimensions in oembed for rich data types (#37108) 2026-01-15 11:45:53 +04:00
crawler_detection_spec.rb
current_user_spec.rb
db_helper_spec.rb FIX: Truncate bookmarks.name when remapping 2024-12-11 18:53:17 -05:00
directory_helper_spec.rb
discourse_diff_spec.rb
discourse_event_spec.rb
discourse_hub_spec.rb DEV: Don’t replace Rails logger in specs (#29721) 2024-11-13 08:47:39 +08:00
discourse_id_spec.rb FEATURE: Discourse ID setting page (#36316) 2025-12-11 16:04:09 +01:00
discourse_ip_info_spec.rb DEV: Don’t replace Rails logger in specs (#29721) 2024-11-13 08:47:39 +08:00
discourse_logstash_logger_spec.rb DEV: Make specs pass with ruby 3.4 (#35411) 2025-10-15 12:40:18 +03:00
discourse_plugin_registry_spec.rb DEV: Add a new type_source field to the Reviewable model. (#31325) 2025-02-20 09:09:47 +11:00
discourse_redis_spec.rb DEV: Upgrade the Redis gem to v5.4 2025-03-19 14:34:00 +01:00
discourse_spec.rb DEV: Deprecate the assignment of nil to site settings (#36093) 2025-12-01 15:04:23 +08:00
discourse_tagging_spec.rb DEV: Setup backend for dedicated tag settings page (#37804) 2026-02-13 17:14:49 +08:00
discourse_updates_spec.rb FEATURE: Remove experimental label & setting toggle for what's new (#38008) 2026-02-26 13:16:42 +10:00
disk_cache_eviction_spec.rb PERF: extract shared DiskCacheEviction utility for disk caches (#37842) 2026-02-16 12:24:38 +01:00
distributed_cache_spec.rb
distributed_memoizer_spec.rb
distributed_mutex_spec.rb DEV: Upgrade the Redis gem to v5.4 2025-03-19 14:34:00 +01:00
email_cook_spec.rb
email_updater_spec.rb FIX: add alternate email duplicate row (#37673) 2026-02-12 12:46:55 +04:00
ember_cli_spec.rb FIX: Ensure ember version in cache key is coupled to compiler (#34694) 2025-09-02 22:29:02 +01:00
encodings_spec.rb
enum_spec.rb
excerpt_parser_spec.rb DEV: Add keep_images option to ExcerptParser (#36077) 2025-11-19 09:20:20 +10:00
feed_element_installer_spec.rb
feed_item_accessor_spec.rb
file_helper_spec.rb SECURITY: Download allowlist for uploaded files 2026-01-28 17:11:14 +00:00
filter_best_posts_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
final_destination_spec.rb SECURITY: Loose hostname matching in FinalDestination 2026-01-28 17:11:14 +00:00
flag_settings_spec.rb FEATURE: custom flag can require additional message (#27908) 2024-07-18 10:10:22 +10:00
gaps_spec.rb
gc_stat_instrumenter_spec.rb DEV: Seperate concerns of tracking GC stat from MethodProfiler (#22921) 2023-08-02 10:46:37 +08:00
git_repo_spec.rb
git_url_spec.rb
git_utils_spec.rb FIX: GitUtils preventing boot (#37599) 2026-02-06 13:07:28 +00:00
global_path_spec.rb
group_lookup_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
guardian_spec.rb SECURITY: prevent regular users from promoting topics to banners 2026-02-26 12:22:54 +00:00
has_errors_spec.rb
hijack_spec.rb DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
homepage_helper_spec.rb DEV: Show login-required splash in root route (take 2) (#32629) 2025-05-14 11:25:43 -04:00
html_prettify_spec.rb
html_to_markdown_spec.rb DEV: fix a large amount of typos (#37428) 2026-02-02 16:31:58 +11:00
http_language_parser_spec.rb FIX: Language parser matches with dashes or underscores (#31381) 2025-02-19 11:55:14 +08:00
image_sizer_spec.rb
inline_oneboxer_spec.rb FEATURE: Add inline_onebox_user_agent site setting (#37324) 2026-01-28 08:43:12 +11:00
js_locale_helper_spec.rb DEV: Refactor locale bundle loading (#37114) 2026-01-16 11:45:14 +00:00
json_error_spec.rb
letter_avatar_spec.rb
localization_attributes_replacer_spec.rb FIX: Do not write localized fancy title to db when fancy_title is null (#37668) 2026-02-10 22:22:07 +08:00
localized_cooked_post_processor_spec.rb FEATURE: Add support for uploads on translated posts (#35871) 2025-11-12 08:55:21 -08:00
message_id_service_spec.rb DEV: Remove old TODOs for message-id formats (#27196) 2024-05-28 13:57:09 +10:00
method_profiler_spec.rb DEV: Seperate concerns of tracking GC stat from MethodProfiler (#22921) 2023-08-02 10:46:37 +08:00
mini_scheduler_long_running_job_logger_spec.rb DEV: Fix state leak in MiniSchedulerLongRunningJobLogger spec (#36453) 2025-12-04 16:47:01 +08:00
mini_sql_multisite_connection_spec.rb
mobile_detection_spec.rb FIX: Update 'modern mobile' regex following iOS 15 support drop (#34792) 2025-09-12 11:33:30 -04:00
new_post_manager_spec.rb DEV: Remove deprecated trust level access settings (#36414) 2025-12-11 11:09:29 +10:00
new_post_result_spec.rb
onebox_spec.rb
oneboxer_spec.rb FIX: youtu.be URLs with parameters not using lazy-video in Chat (#37473) 2026-02-04 08:49:33 +01:00
onpdiff_spec.rb DEV: Add comparison budget to ONPDiff (#38063) 2026-02-25 14:25:03 -05:00
password_hasher_spec.rb
pbkdf2_spec.rb
pinned_check_spec.rb DEV: Fix various spec linting issues (#24672) 2023-12-04 13:45:19 +01:00
plain_text_to_markdown_spec.rb
post_action_creator_spec.rb FIX: Exclude notify_moderators PMs from personal message rate limit (#38021) 2026-02-24 14:27:50 +01:00
post_action_destroyer_spec.rb DEV: Convert min_trust_to_flag_posts setting to groups (#24864) 2023-12-13 17:18:42 +08:00
post_action_type_view_spec.rb FIX: Missing/incorrect flag reason in account_deleted emails (#34955) 2025-11-17 15:22:22 +00:00
post_creator_spec.rb FIX: Ensure post_created event fires even if topic_created event hooks have exceptions (#38146) 2026-03-03 19:38:50 +08:00
post_destroyer_spec.rb FIX: Complete protection for potentially illegal reviewables on post deletion (#37536) 2026-02-05 09:42:52 +01:00
post_jobs_enqueuer_spec.rb
post_localization_creator_spec.rb FIX: Also check if user can see post or topic prior to letting them localize it (#36749) 2025-12-18 02:12:58 +08:00
post_localization_destroyer_spec.rb FIX: Also check if user can see post or topic prior to letting them localize it (#36749) 2025-12-18 02:12:58 +08:00
post_localization_updater_spec.rb FIX: Also check if user can see post or topic prior to letting them localize it (#36749) 2025-12-18 02:12:58 +08:00
post_locker_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
post_merger_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
post_revisor_spec.rb SECURITY: prevent regular users from promoting topics to banners 2026-02-26 12:22:54 +00:00
presence_channel_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
pretty_text_spec.rb FIX: Preserve display name in quotes when using the rich text editor (#38078) 2026-02-26 21:04:07 +01:00
promotion_spec.rb FIX: recalculate respects default invitee trust level (#32393) 2025-04-23 09:49:44 +08:00
quote_comparer_spec.rb DEV: Correct Style/RedundantReturn rubocop issues (#23052) 2023-08-10 02:03:38 +02:00
quote_rewriter_spec.rb FIX: Preserve display name in quotes when using the rich text editor (#38078) 2026-02-26 21:04:07 +01:00
rate_limiter_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
read_only_mixin_spec.rb FIX: improve "read only" modes (#33521) 2025-07-10 09:08:00 +02:00
retrieve_title_spec.rb FIX: Don't error out when trying to retrieve title and URL won't encode (#24660) 2023-12-01 15:03:06 +08:00
rtl_spec.rb
s3_cors_rulesets_spec.rb
s3_helper_spec.rb DEV: Bump aws-sdk-core in prep for aws-sdk-mediaconvert (#33250) 2025-06-20 16:41:01 -06:00
s3_inventory_multisite_spec.rb FIX: S3Inventory#backfill_etags_and_list_missing need to unescape key (#30787) 2025-01-15 14:52:49 +08:00
s3_inventory_spec.rb DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
schema_settings_object_validator_spec.rb DEV: Add datetime type for site settings / object settings (#36849) 2025-12-30 10:52:30 -06:00
score_calculator_spec.rb
scss_checker_spec.rb DEV: Compile 'common' CSS into own assets (#31416) 2025-05-01 10:44:49 +01:00
search_spec.rb FIX: Exclude user names from topic search when enable_names is disabled (#38011) 2026-02-25 11:42:47 +08:00
server_session_spec.rb DEV: Allow ServerSession to store arbitrary data (#34919) 2025-09-26 10:35:28 +02:00
service_spec.rb DEV: Allow contracts to inherit from another class (#35599) 2025-10-30 10:05:36 +01:00
shrink_uploaded_image_spec.rb FIX: Return file paths from FileStore download methods (#37760) 2026-02-17 11:56:50 +01:00
sidebar_section_links_updater_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
sidekiq_long_running_job_logger_spec.rb DEV: Upgrade Sidekiq to v7.3.9 2025-03-10 15:02:48 +01:00
signal_trap_logger_spec.rb DEV: Move spec file to right folder (#27449) 2024-06-13 06:38:03 +08:00
site_icon_manager_spec.rb FIX: Handle missing sketch logo during backup restore (#36541) 2025-12-08 19:30:53 +01:00
site_setting_extension_multisite_spec.rb
site_setting_extension_spec.rb DEV: add modifier for site setting data and outlets (#38133) 2026-03-02 14:05:48 -08:00
slug_spec.rb
spam_handler_spec.rb DEV: Remove full group refreshes from tests (#25414) 2024-01-25 14:28:26 +08:00
statistics_spec.rb DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
suggested_topics_builder_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
system_message_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
system_themes_manager_spec.rb DEV: Fix broken SystemThemesManager spec (#37335) 2026-01-28 11:29:42 +10:00
tag_localization_creator_spec.rb FEATURE: Introduce tag localizations with API, without UI yet (#36754) 2025-12-18 18:25:58 +08:00
tag_localization_destroyer_spec.rb FEATURE: Introduce tag localizations with API, without UI yet (#36754) 2025-12-18 18:25:58 +08:00
tag_localization_updater_spec.rb FEATURE: Introduce tag localizations with API, without UI yet (#36754) 2025-12-18 18:25:58 +08:00
text_cleaner_spec.rb DEV: fix a large amount of typos (#37428) 2026-02-02 16:31:58 +11:00
text_sentinel_spec.rb FIX: Allow all caps within CJK text (#28018) 2024-07-22 17:35:52 +02:00
theme_flag_modifier_spec.rb
theme_javascript_compiler_spec.rb DEV: Rename theme-compiler's entrypoint and compatModules (#37768) 2026-02-12 16:11:43 +01:00
theme_screenshots_handler_spec.rb FIX: ignore SiteSetting.max_image_size_kb for theme screenshots (#33215) 2025-06-17 08:58:37 +08:00
theme_settings_manager_spec.rb DEV: Refactor subclasses in ThemeSettingsManager to individual files (#25605) 2024-02-08 12:59:52 +08:00
theme_settings_parser_spec.rb FEATURE: system themes (#32681) 2025-06-13 10:36:31 +08:00
theme_settings_validator_spec.rb DEV: Correctly pluralize error messages (#26469) 2024-04-04 15:02:09 +02:00
theme_site_setting_resolver_spec.rb FEATURE: Themeable site settings (#32233) 2025-07-16 11:00:21 +10:00
timeline_lookup_spec.rb
tiny_japanese_segmenter_spec.rb
topic_creator_spec.rb FEATURE: support target_user_ids for private messages (#37708) 2026-02-12 09:21:40 +11:00
topic_localization_creator_spec.rb FIX: Update topic excerpts when the first post is localized (#36885) 2025-12-29 23:33:39 +08:00
topic_localization_destroyer_spec.rb FIX: Also check if user can see post or topic prior to letting them localize it (#36749) 2025-12-18 02:12:58 +08:00
topic_localization_updater_spec.rb FIX: Also check if user can see post or topic prior to letting them localize it (#36749) 2025-12-18 02:12:58 +08:00
topic_publisher_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
topic_query_spec.rb DEV: Deprecate the assignment of nil to site settings (#36093) 2025-12-01 15:04:23 +08:00
topic_retriever_spec.rb
topic_upload_security_manager_spec.rb
topic_view_spec.rb FIX: Don’t apply callbacks from disabled plugins (#35630) 2025-10-30 10:04:17 +01:00
topics_bulk_action_spec.rb DEV: route bulk tag actions through PostRevisor (#37848) 2026-02-24 14:39:01 +01:00
topics_filter_spec.rb FIX: Exclude deleted posts from group topic filter (#38000) 2026-02-23 20:57:11 +01:00
trashable_spec.rb
truncate_logs_formatter_spec.rb SECURITY: Add a default limit as to when logs should be truncated 2023-10-16 10:34:38 -04:00
trust_level_spec.rb
twitter_api_spec.rb Revert "DEV: Replace Rinku native gem with PrettyText" (#31692) 2025-03-07 12:01:22 +10:00
unread_spec.rb
upcoming_changes_spec.rb UX: Allow plugins to define upcoming change images (#37320) 2026-01-27 17:44:11 +10:00
upload_creator_spec.rb FEATURE: Support non-image file uploads in site settings (#37005) 2026-01-19 22:37:38 +01:00
upload_markdown_spec.rb
upload_recovery_spec.rb DEV: Add setting to tag s3 objects enabling tag based access control policies (#32988) 2025-06-16 13:26:18 +08:00
upload_security_spec.rb DEV: Fix various spec linting issues (#24672) 2023-12-04 13:45:19 +01:00
url_helper_spec.rb DEV: Add isValidUrl helper function to theme migrations (#26817) 2024-04-30 16:45:07 +08:00
user_comm_screener_spec.rb FIX: likes are not visible when rejecting PMs (#35753) 2025-11-03 16:23:32 +11:00
user_lookup_spec.rb
user_name_suggester_spec.rb FIX: Leave username blank during OAuth signup when no valid suggestion exists (#36830) 2026-01-08 11:02:35 +01:00
version_compatibility_spec.rb DEV: Add support for d-compat branches in plugins/themes (#37984) 2026-02-24 17:44:27 +01:00
work_queue_spec.rb PERF: Don't allow a single user to monopolize the defer queue (#25593) 2024-02-07 13:47:50 -06:00