docbrown/spec/models
Jeremy Friesen 29f6853ee9
Refactoring Spam Handler (#15412)
* Refactoring Spam Handler

There's considerable repeated logic between checking spam for an article
and spam for a comment and user.

This attempts to send things through channels that are similar and close
in organization.

* Fixing broken spec

* Fixing spec around recent user

* Update app/models/reaction.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Update app/models/reaction.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Consolidating new user query logic

Prior to this commit there were two separate queries around new user
logic.  With this commit, we're changing the logic to repurpose a site
wide setting.

* Generalizing a previously specific message

* Fixing method name

As part of a recommended refactor, I extracted a method, then renamed
it.  I failed to account for that renaming.

This commit fixes that.

Co-authored-by: Michael Kohl <citizen428@forem.com>
2021-11-30 12:45:12 -05:00
..
ahoy
concerns
settings Refactoring Spam Handler (#15412) 2021-11-30 12:45:12 -05:00
shared_examples Remove CustomProfileField (#14286) 2021-07-22 10:05:39 +07:00
users Theming cleanup (#15237) 2021-11-09 10:11:55 -05:00
webhook
ab_experiment_spec.rb Configurable weighted feed strategy (#15240) 2021-11-29 10:46:56 -05:00
api_secret_spec.rb
application_record_spec.rb Allow Emails::RemoveOldEmailsWorker to run longer (#15085) 2021-10-15 11:53:55 -04:00
article_destroy_spec.rb
article_spec.rb Refactoring Spam Handler (#15412) 2021-11-30 12:45:12 -05:00
audit_log_spec.rb
badge_achievement_spec.rb
badge_spec.rb
banished_user_spec.rb
broadcast_spec.rb
collection_spec.rb
comment_spec.rb Refactoring Spam Handler (#15412) 2021-11-30 12:45:12 -05:00
consumer_app_spec.rb ForemMobile namespaced functions (#15212) 2021-11-23 15:25:29 -06:00
credit_spec.rb
data_update_script_spec.rb
device_spec.rb Add mutable flag to APNS notifcation payload (#14777) 2021-09-21 15:37:43 -05:00
discussion_lock_spec.rb Cooldown Project: Introduce StringAttributeCleaner (#15281) 2021-11-06 14:58:14 +07:00
display_ad_event_spec.rb
display_ad_spec.rb Remove organization dependency and improve display ad UX (#14913) 2021-10-05 08:29:08 -04:00
email_authorization_spec.rb Refactor Admin Member Detail view - Tools section (#14283) 2021-08-17 18:55:53 +02:00
email_message_spec.rb Delete old retained emails after certain period (#14949) 2021-10-12 16:27:13 -04:00
feedback_message_spec.rb Refactor Admin Member Detail view - Tools section (#14283) 2021-08-17 18:55:53 +02:00
follow_spec.rb ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
forem_instance_spec.rb
github_issue_spec.rb
github_repo_spec.rb
hair_trigger_spec.rb Ensure ActiveRecord::Base has descendants before checking triggers (#14732) 2021-09-15 09:29:44 -05:00
html_variant_spec.rb
html_variant_success_spec.rb
html_variant_trial_spec.rb
identity_spec.rb Forem passport (cont) (#14759) 2021-09-30 06:47:45 -06:00
listing_category_spec.rb
listing_spec.rb
mention_spec.rb
navigation_link_spec.rb Profile generalization: cleanup (#12947) 2021-08-20 16:36:02 +02:00
note_spec.rb
notification_spec.rb
notification_subscription_spec.rb
organization_membership_spec.rb ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
organization_spec.rb Rubocop fixes (#14868) 2021-09-30 13:22:09 -04:00
page_spec.rb
page_view_spec.rb
pinned_article_spec.rb
podcast_episode_appearance_spec.rb
podcast_episode_spec.rb
podcast_ownership_spec.rb
podcast_spec.rb
poll_option_spec.rb
poll_skip_spec.rb Refactoring poll/vote/skip logic (#15441) 2021-11-29 10:52:32 -05:00
poll_spec.rb Refactoring poll/vote/skip logic (#15441) 2021-11-29 10:52:32 -05:00
poll_vote_spec.rb Refactoring poll/vote/skip logic (#15441) 2021-11-29 10:52:32 -05:00
profile_field_group_spec.rb
profile_field_spec.rb Profile generalization cleanup phase 2 (#14555) 2021-08-27 09:17:26 +07:00
profile_pin_spec.rb
profile_spec.rb Remove check_box type from profile fields (#14832) 2021-09-30 13:27:39 -04:00
rating_vote_spec.rb
reaction_spec.rb Refactoring Spam Handler (#15412) 2021-11-30 12:45:12 -05:00
response_template_spec.rb
role_spec.rb ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
sponsorship_spec.rb Only permit valid class names as sponsorable type (#14387) 2021-11-05 12:25:35 -05:00
tag_adjustment_spec.rb
tag_spec.rb ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
timeframe_spec.rb
tweet_spec.rb
user_block_spec.rb
user_role_spec.rb
user_spec.rb Refactoring Spam Handler (#15412) 2021-11-30 12:45:12 -05:00
user_subscription_spec.rb