Skip to content
Browse files

Added initial spec to LDAP strategy.

Adopting the idea that an empty file is better than no file, and a single spec is better than no spec.
  • Loading branch information...
1 parent 07b8b45 commit cc9fbe6a46277cad6663e51cdad907b1f1683d57 @jeremyf jeremyf committed May 19, 2011
Showing with 30 additions and 0 deletions.
  1. +30 −0 oa-enterprise/spec/omniauth/strategies/ldap_spec.rb
View
30 oa-enterprise/spec/omniauth/strategies/ldap_spec.rb
@@ -0,0 +1,30 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+require 'cgi'
+
+describe OmniAuth::Strategies::LDAP, :type => :strategy do
+
+ include OmniAuth::Test::StrategyTestCase
+
+ def strategy
+ @ldap_server ||= 'ldap.example.org'
+ [OmniAuth::Strategies::LDAP, {
+ :host => @ldap_server,
+ :port => 636,
+ :method => :ssl,
+ :uid => 'jeremyf',
+ :base => 'o="University of OmniAuth", st=Sublime, c=RubyNation',
+ }]
+ end
+
+ describe 'GET /auth/ldap' do
+ before do
+ get '/auth/ldap'
+ end
+
+ # TODO: Add checks that page has authentication form; I attempted
+ # to use `should have_tag` but that was not working.
+ it 'should get authentication page' do
+ last_response.status.should == 200
+ end
+ end
+end

0 comments on commit cc9fbe6

Please sign in to comment.
Something went wrong with that request. Please try again.