# frozen_string_literal: truerequire'spec_helper'RSpec.describeSshKeysHelperdodescribe'#ssh_key_allowed_algorithms'doit'returns string with the names of allowed algorithms that are quoted and joined by commas'doallowed_algorithms=Gitlab::CurrentSettings.allowed_key_types.flat_mapdo|ssh_key_type_name|Gitlab::SSHPublicKey.supported_algorithms_for_name(ssh_key_type_name)endquoted_allowed_algorithms=allowed_algorithms.map{|name|"'#{name}'"}expected_string=Gitlab::Utils.to_exclusive_sentence(quoted_allowed_algorithms)expect(ssh_key_allowed_algorithms).toeq(expected_string)endit'returns only allowed algorithms'do