@@ -213,21 +213,25 @@ def test_membership_for_posixGroups
213
213
class GitHubLdapWithoutPosixGroupsTest < GitHub ::Ldap ::Test
214
214
def self . test_server_options
215
215
{
216
+ custom_schemas : FIXTURES . join ( 'posixGroup.schema.ldif' ) ,
217
+ user_fixtures : FIXTURES . join ( 'github-with-posixGroups.ldif' ) . to_s ,
216
218
# so we test the test the non-recursive group membership search
217
- recursive_group_search_fallback : false
219
+ recursive_group_search_fallback : false ,
220
+ # explicitly disable posixGroup support (even if the schema supports it)
221
+ posix_support : false
218
222
}
219
223
end
220
224
221
225
def setup
222
226
@ldap = GitHub ::Ldap . new ( options )
223
227
@domain = @ldap . domain ( "dc=github,dc=com" )
224
- @cn = "Enterprise "
228
+ @cn = "enterprise-posix-devs "
225
229
end
226
230
227
231
def test_membership_for_posixGroups
228
- assert user = @ldap . domain ( 'uid=calavera ,dc=github,dc=com' ) . bind
232
+ assert user = @ldap . domain ( 'uid=mtodd,ou=users ,dc=github,dc=com' ) . bind
229
233
230
- assert @domain . is_member? ( user , [ @cn ] ) ,
231
- "Expected `#{ @cn } ` to include the member `#{ user . dn } `"
234
+ refute @domain . is_member? ( user , [ @cn ] ) ,
235
+ "Expected `#{ @cn } ` to not include the member `#{ user . dn } `"
232
236
end
233
237
end
0 commit comments