discourse/spec/support
Alan Guo Xiang Tan a473e352de
DEV: Introduce TopicGuardian#can_see_topic_ids method (#18692)
Before this commit, there was no way for us to efficiently check an
array of topics for which a user can see. Therefore, this commit
introduces the `TopicGuardian#can_see_topic_ids` method which accepts an
array of `Topic#id`s and filters out the ids which the user is not
allowed to see. The `TopicGuardian#can_see_topic_ids` method is meant to
maintain feature parity with `TopicGuardian#can_see_topic?` at all
times so a consistency check has been added in our tests to ensure that
`TopicGuardian#can_see_topic_ids` returns the same result as
`TopicGuardian#can_see_topic?`. In the near future, the plan is for us
to switch to `TopicGuardian#can_see_topic_ids` completely but I'm not
doing that in this commit as we have to be careful with the performance
impact of such a change.

This method is currently not being used in the current commit but will
be relied on in a subsequent commit.
2022-10-27 06:13:21 +08:00
..
versioning Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
bookmarkable_helper.rb FIX: Allow .ics for polymorphic bookmarks (#16694) 2022-05-11 09:29:24 +10:00
common_basic_reviewable_serializer.rb DEV: Include pending reviewables in the main tab in the user menu (#18471) 2022-10-05 12:30:02 +03:00
concurrency.rb Revert "FIX: Redis fallback handler refactoring (#8771)" (#8776) 2020-01-24 09:20:17 +11:00
diagnostics_helper.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
discourse_event_helper.rb DEV: Refactor user_badge_granted DiscourseEvent logic (#17579) 2022-07-22 09:06:02 +08:00
fake_logger.rb Build(deps-dev): Bump rspec-rails from 5.1.2 to 6.0.0 (#18534) 2022-10-12 20:25:49 +02:00
fake_s3.rb DEV: Run some specs with fake S3 implementation instead of stubs 2022-06-28 21:27:52 +02:00
fast_image_helpers.rb FIX: remove 'crawl_images' site setting (#14646) 2021-10-19 17:12:29 +05:30
helpers.rb DEV: Remove usages of enable_personal_messages (#18437) 2022-10-05 10:50:20 +10:00
imap_helper.rb DEV: Move imap_helper to spec/support directory (#14776) 2021-10-29 20:46:25 +02:00
integration_helpers.rb FEATURE: Allow using invites when DiscourseConnect SSO is enabled (#12419) 2021-03-19 10:20:10 +10:00
match_html_matcher.rb FIX: Make Oneboxer#apply insert block Oneboxes correctly (#11449) 2020-12-14 17:49:37 +02:00
negated_matcher.rb DEV: Don’t use change { … }.by(0) in specs 2022-07-26 10:34:15 +02:00
onebox_helpers.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
rate_limit_matcher.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
session_controller_helper_routes.rb FEATURE: Centralized 2FA page (#15377) 2022-02-17 12:12:59 +03:00
shared_examples_for_stats_cacheable.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
sidekiq_helpers.rb DEV: Change Topic Timer from enqueue_at scheduled jobs to incrementally executed jobs (#11698) 2021-01-19 13:30:58 +10:00
site_settings_helpers.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
system_helpers.rb DEV: Minimal first pass of rails system test setup (#16311) 2022-09-28 11:48:16 +10:00
test_second_factor_action.rb FEATURE: Add 2FA support to the Discourse Connect Provider protocol (#16386) 2022-04-13 15:04:09 +03:00
time_matcher.rb DEV: adds within_one_minute time matcher (#12109) 2021-02-17 10:52:49 +01:00
topic_guardian_can_see_consistency_check.rb DEV: Introduce TopicGuardian#can_see_topic_ids method (#18692) 2022-10-27 06:13:21 +08:00
uploads_helpers.rb DEV: Rename secure_media to secure_uploads (#18376) 2022-09-29 09:24:33 +10:00
user_sidebar_tags_mixin.rb UX: Hide tags section in sidebar when user has no visible tags (#18539) 2022-10-13 08:37:28 +08:00
webauthn_integration_helpers.rb DEV: stop freezing frozen strings 2020-04-30 16:48:53 +10:00