2015-04-26 12:48:37 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Gitlab::LDAP::Config 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
|
2015-09-11 14:41:01 +05:30
|
|
|
expect{ Gitlab::LDAP::Config.new 'unknown' }.to raise_error(RuntimeError)
|
2015-04-26 12:48:37 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|