File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Gem::Specification.new do |gem|
99 gem . homepage = "https://github.com/intridea/omniauth-ldap"
1010 gem . license = "MIT"
1111
12- gem . add_runtime_dependency 'omniauth' , '~> 1.8.1 '
12+ gem . add_runtime_dependency 'omniauth' , '~> 2.0.0 '
1313 gem . add_runtime_dependency 'net-ldap' , '~> 0.16'
1414 gem . add_runtime_dependency 'pyu-ruby-sasl' , '~> 0.0.3.3'
1515 gem . add_runtime_dependency 'rubyntlm' , '~> 0.6.2'
Original file line number Diff line number Diff line change @@ -27,9 +27,18 @@ class MyLdapProvider < OmniAuth::Strategies::LDAP; end
2727 expect ( OmniAuth ::Utils . camelize ( 'ldap' ) ) . to eq 'LDAP'
2828 end
2929
30- describe '/auth/ldap' do
30+ describe 'get /auth/ldap' do
3131 before ( :each ) { get '/auth/ldap' }
3232
33+ it 'should return 404' do
34+ expect ( last_response . status ) . to eq 404
35+ expect ( last_response . body ) . to_not include ( "<form" )
36+ end
37+ end
38+
39+ describe '/auth/ldap' do
40+ before ( :each ) { post ( '/auth/ldap' , { } ) }
41+
3342 it 'should display a form' do
3443 expect ( last_response . status ) . to eq 200
3544 expect ( last_response . body ) . to include ( "<form" )
Original file line number Diff line number Diff line change 77require 'omniauth'
88require 'omniauth-ldap'
99
10+ OmniAuth . config . request_validation_phase = proc { }
11+
1012RSpec . configure do |config |
1113 config . include Rack ::Test ::Methods
1214 config . extend OmniAuth ::Test ::StrategyMacros , :type => :strategy
You can’t perform that action at this time.
0 commit comments