uses simple_captcha instead of recaptcha [#51]
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe RecaptchaHelper do
|
||||
|
||||
describe '#recaptchable?' do
|
||||
|
||||
it 'should be true if new record' do
|
||||
debate = build(:debate)
|
||||
expect(helper.recaptchable?(debate)).to be true
|
||||
end
|
||||
|
||||
it 'should be false if existing record' do
|
||||
debate = create(:debate)
|
||||
expect(helper.recaptchable?(debate)).to be false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "#recaptcha_keys?" do
|
||||
|
||||
it "should be true if Recaptcha keys are configured" do
|
||||
allow(Recaptcha.configuration).to receive(:public_key).and_return("akjasf")
|
||||
allow(Recaptcha.configuration).to receive(:private_key).and_return("akjasf4532")
|
||||
|
||||
expect(helper.recaptcha_keys?).to be true
|
||||
end
|
||||
|
||||
it "should be false if Recaptcha keys are not configured" do
|
||||
allow(Recaptcha.configuration).to receive(:public_key).and_return(nil)
|
||||
allow(Recaptcha.configuration).to receive(:private_key).and_return(nil)
|
||||
|
||||
expect(helper.recaptcha_keys?).to be false
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user