discourse/spec/support/negated_matcher.rb
Loïc Guitaut c11c6c3ba2
FIX: Filter hidden posts from raw topic markdown endpoint (#38237)
The `/raw/:topic_id` endpoint was exposing hidden posts to users who
shouldn't see them, while `/raw/:topic_id/:post_number` correctly
filtered them via `guardian.can_see?`.

This inconsistency meant anonymous users and regular users could see
hidden post content when fetching a whole topic as markdown.

Also refactors `markdown_num` into smaller private methods for clarity.
2026-03-04 12:48:22 +01:00

4 lines
149 B
Ruby

# frozen_string_literal: true
RSpec::Matchers.define_negated_matcher :not_change, :change
RSpec::Matchers.define_negated_matcher :exclude, :include