• Alex Kalderimis's avatar
    Add wiki_events feature flag · ba5e8da3
    Alex Kalderimis authored
    This ensures that the methods we use for retrieving events respect the
    :wiki_events feature flag.
    
    This flag must be applied in two places - both in the event_collection
    and in the events_finder, since there exist places in the code base
    where the event_collection is used without the finder (for example in
    the projects or the groups controllers) so it must be applied there, but
    in the events_finder there is a branch that by-passes the
    event_collection, so we also need it in the finder.
    
    To support this flag, we have a new scope `Event.not_wiki_page`, which
    only returns events that are not wiki page events.
    
    This flag is off by default.
    
    This includes improvements to the event collection spec by asserting
    identity rather than length of results.
    
    Includes suggested changes from reviewer (@.luke)
    
    Co-authored-by: @.luke
    ba5e8da3
events_finder.rb 3.44 KB