Sha256: 3df35ff1ab9920a998d778119289106e7ed30ea5bd10c420258eede2dc0df7e2

Contents?: true

Size: 1.12 KB

Versions: 5

Compression:

Stored size: 1.12 KB

Contents

require 'spec_helper'

describe Adauth::Connection do
  it "should support encryption" do
    Adauth.configure do |c|
      c.domain = test_data("domain", "domain")
      c.port = test_data("domain", "port")
      c.base = test_data("domain", "base")
      c.server = test_data("domain", "server")
      c.encryption = :simple_tls
      c.query_user = test_data("domain", "query_user")
      c.query_password = test_data("domain", "query_password")
    end
    begin
      Adauth.authenticate(test_data("domain", "query_user"), test_data("domain", "query_password"))
    rescue
      # Failed to authenticate due to encryption (not what we are testing here)
    end
  end
  
  it "should timeout if asked to connect to a server that doesn't exist" do
    Adauth.configure do |c|
      c.domain = test_data("domain", "domain")
      c.port = test_data("domain", "port")
      c.base = test_data("domain", "base")
      c.server = "127.0.0.2"
      c.query_user = test_data("domain", "query_user")
      c.query_password = test_data("domain", "query_password")
    end

    lambda { Adauth::AdObjects::User.all }.should raise_exception
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
adauth-2.0.5 spec/adauth_connection_spec.rb
adauth-2.0.4 spec/adauth_connection_spec.rb
adauth-2.0.3 spec/adauth_connection_spec.rb
adauth-2.0.2 spec/adauth_connection_spec.rb
adauth-2.0.1 spec/adauth_connection_spec.rb