Skip to content

Commit

Permalink
Merge pull request #1802 from 3scale/remove-empty-methods-helper-unst…
Browse files Browse the repository at this point in the history
…ub-spam_protection

Remove empty methods related to a test helper to unstub spam_protection
  • Loading branch information
Martouta authored Mar 31, 2020
2 parents 7645462 + 5e9d3d3 commit c5f3f47
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions test/test_helpers/spam_protection_stubs.rb
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
# frozen_string_literal: true

module TestHelpers
module SpamProtectionStubs

def self.included(base)
base.teardown(:clear_spam_protection_stubs)
end

def stub_spam_protection_needed
ThreeScale::SpamProtection::Protector::FormProtector.any_instance.stubs(:captcha_needed?)
end


def stub_spam_protection_timestamp_probability(value)
ThreeScale::SpamProtection::Checks::Timestamp.any_instance.stubs(:probability).returns(value)
end

# unstubs

def unstub_spam_protection_needed

end

def clear_spam_protection_stubs
unstub_spam_protection_needed
end

end
end

Expand Down

0 comments on commit c5f3f47

Please sign in to comment.