gitlab-org--gitlab-foss/spec/lib/gitlab/ldap/config_spec.rb

21 lines
518 B
Ruby
Raw Normal View History

require 'spec_helper'
2015-12-09 05:55:36 -05:00
describe Gitlab::LDAP::Config, lib: true do
let(:config) { Gitlab::LDAP::Config.new provider }
let(:provider) { 'ldapmain' }
describe '#initalize' do
it 'requires a provider' do
expect{ Gitlab::LDAP::Config.new }.to raise_error ArgumentError
end
it "works" do
expect(config).to be_a described_class
end
it "raises an error if a unknow provider is used" do
expect{ Gitlab::LDAP::Config.new 'unknown' }.to raise_error(RuntimeError)
end
end
end