Split up auth'd, unauth'd and global default settings tests
This commit is contained in:
Родитель
a23ccef696
Коммит
c03c0de418
|
@ -136,27 +136,30 @@ module GitHubLdapTestCases
|
|||
assert_equal [stub_entry], results
|
||||
end
|
||||
|
||||
def test_global_catalog_default_settings
|
||||
global_catalog = @ldap.global_catalog_connection
|
||||
|
||||
assert_equal "localhost", global_catalog.host
|
||||
assert_equal 3268, global_catalog.port
|
||||
end
|
||||
|
||||
module GitHubLdapUnauthenticatedTestCases
|
||||
def test_global_catalog_default_settings
|
||||
def test_global_catalog_unauthenticated_default_settings
|
||||
global_catalog = @ldap.global_catalog_connection
|
||||
# this is ugly, but currently the only way to test Net::LDAP#auth values
|
||||
auth = global_catalog.instance_variable_get(:@auth)
|
||||
|
||||
assert_equal "localhost", global_catalog.host
|
||||
assert_equal 3268, global_catalog.port
|
||||
assert_equal nil, auth[:password]
|
||||
assert_equal nil, auth[:username]
|
||||
end
|
||||
end
|
||||
|
||||
module GitHubLdapAuthenticatedTestCases
|
||||
def test_global_catalog_default_settings
|
||||
def test_global_catalog_authenticated_default_settings
|
||||
global_catalog = @ldap.global_catalog_connection
|
||||
# this is ugly, but currently the only way to test Net::LDAP#auth values
|
||||
auth = global_catalog.instance_variable_get(:@auth)
|
||||
|
||||
assert_equal "localhost", global_catalog.host
|
||||
assert_equal 3268, global_catalog.port
|
||||
assert_equal "passworD1", auth[:password]
|
||||
assert_equal "uid=admin,dc=github,dc=com", auth[:username]
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче