Commit e75bf198 authored by Robert Speicher's avatar Robert Speicher

Fix Gitlab::LDAP::Config spec

parent 33a4a84e
require 'spec_helper' require 'spec_helper'
describe Gitlab::LDAP::Config do describe Gitlab::LDAP::Config do
let(:config) { Gitlab::LDAP::Config.new provider } let(:config) { described_class.new provider }
let(:provider) { 'ldapmain' } let(:provider) { 'ldapmain' }
describe '#initalize' do describe '#initalize' do
it 'requires a provider' do it 'requires a provider' do
expect{ Gitlab::LDAP::Config.new }.to raise_error ArgumentError expect{ described_class.new }.to raise_error ArgumentError
end end
it "works" do it "works" do
...@@ -14,7 +14,8 @@ describe Gitlab::LDAP::Config do ...@@ -14,7 +14,8 @@ describe Gitlab::LDAP::Config do
end end
it "raises an error if a unknow provider is used" do 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 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