Commit d27061d5 authored by Dennis Schubert's avatar Dennis Schubert Committed by Jonne Haß

Set captcha length correctly, fix #5932

parent f8b3836d
SimpleCaptcha.setup do |sc|
sc.image_size = AppConfig.settings.captcha.image_size
sc.length = [1, [AppConfig.settings.captcha_length.to_i, 12].min].max
sc.length = [1, [AppConfig.settings.captcha.captcha_length.to_i, 12].min].max
sc.image_style = AppConfig.settings.captcha.image_style
sc.distortion = AppConfig.settings.captcha.distortion
end
require "spec_helper"
describe "ensure configuration effects" do
it "sets the captcha length as required" do
expect(SimpleCaptcha.length).to eq(AppConfig.settings.captcha.captcha_length.to_i)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment