Sha256: 1bf4951c82638e57ef543fb11e9b537b6b23efd3a4980d0055b7a8a1c92fd38e

Contents?: true

Size: 842 Bytes

Versions: 4

Compression:

Stored size: 842 Bytes

Contents

require 'adauth'
require 'yaml'

def default_config
    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.query_user = test_data("domain", "query_user")
        c.query_password = test_data("domain", "query_password")
    end
end

def test_data(set, key)
    @yaml ||= YAML::load(File.open('spec/test_data.yml'))
    @yaml[set][key]
end

def administrator
    Adauth::AdObjects::User.where('sAMAccountName', "administrator").first
end

def domain_admins
    Adauth::AdObjects::Group.where('name', 'Domain Admins').first
end

def domain_controllers
    Adauth::AdObjects::OU.where('name', 'Domain Controllers').first
end

def pdc
    domain_controllers.members.first
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
adauth-2.0.0 spec/spec_helper.rb
adauth-2.0.0pre2 spec/spec_helper.rb
adauth-2.0.0pre1 spec/spec_helper.rb
adauth-2.0.0pre spec/spec_helper.rb