Welcome to mirror list, hosted at ThFree Co, Russian Federation.

registrations_helper_spec.rb « helpers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: eec87bc871231b73d91c922a57f9ca3fc0c0ae4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe RegistrationsHelper do
  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

  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
end