Commit e75bf198 authored by Robert Speicher's avatar Robert Speicher

Fix Gitlab::LDAP::Config spec

parent 33a4a84e
require 'spec_helper'
describe Gitlab::LDAP::Config do
let(:config) { Gitlab::LDAP::Config.new provider }
let(:config) { described_class.new provider }
let(:provider) { 'ldapmain' }
describe '#initalize' do
it 'requires a provider' do
expect{ Gitlab::LDAP::Config.new }.to raise_error ArgumentError
expect{ described_class.new }.to raise_error ArgumentError
end
it "works" do
......@@ -14,7 +14,8 @@ describe Gitlab::LDAP::Config do
end
it "raises an error if a unknow provider is used" do
expect{ Gitlab::LDAP::Config.new 'unknown' }.to raise_error(RuntimeError)
expect { described_class.new 'unknown' }.
to raise_error(described_class::InvalidProvider)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment