BigW Consortium Gitlab

config_spec.rb 507 Bytes
Newer Older
1 2 3 4 5 6
require 'spec_helper'

describe Gitlab::LDAP::Config do
  let(:config) { Gitlab::LDAP::Config.new provider }
  let(:provider) { 'ldapmain' }

7
  describe '#initalize' do
8 9 10 11 12 13 14 15 16
    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
17
      expect{ Gitlab::LDAP::Config.new 'unknown' }.to raise_error(RuntimeError)
18 19
    end
  end
20
end