• Chad Woolley's avatar
    Refactor SpamActionService and its usage · 93ac9733
    Chad Woolley authored
    * Removes 'SpamCheckMethods' and makes spam-checking workflow
      explicit in callers
    * Moves captcha verification to be encapsulated in 'SpamActionService'
    * Introduces 'CaptchaVerificationService', which can be expanded upon
      on the future for additional captcha implementations.
    * Moves handling of 'request' parameter to be called only where it
      is needed.
    * Removes memoization of GitLab::Recaptcha.load_configurations! -
      it complicates testing/mocking, and it isn't clear why it was
      ever needed - it isn't memoized other places.
    * Rewrites issue and snippet service create/update tests to remove
      tests of internal behavior of other services, and instead just
      test their collaborations via mock expectations.
    * Expands and improves test coverage of SpamActionService
    * Other related changes to accomodate new interface and behavior.
    93ac9733
spammable_actions_spec.rb 2.87 KB