2021-06-08 01:23:25 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
RSpec.describe RegistrationsHelper do
|
2021-09-04 01:27:46 +05:30
|
|
|
describe '#signup_username_data_attributes' do
|
|
|
|
it 'has expected attributes' do
|
|
|
|
expect(helper.signup_username_data_attributes.keys).to include(:min_length, :min_length_message, :max_length, :max_length_message, :qa_selector)
|
|
|
|
end
|
|
|
|
end
|
2023-04-23 21:23:45 +05:30
|
|
|
|
|
|
|
describe '#arkose_labs_challenge_enabled?' do
|
|
|
|
before do
|
|
|
|
stub_application_setting(
|
|
|
|
arkose_labs_private_api_key: nil,
|
|
|
|
arkose_labs_public_api_key: nil,
|
|
|
|
arkose_labs_namespace: nil
|
|
|
|
)
|
|
|
|
stub_env('ARKOSE_LABS_PRIVATE_KEY', nil)
|
|
|
|
stub_env('ARKOSE_LABS_PUBLIC_KEY', nil)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'is false' do
|
|
|
|
expect(helper.arkose_labs_challenge_enabled?).to eq false
|
|
|
|
end
|
|
|
|
end
|
2021-06-08 01:23:25 +05:30
|
|
|
end
|