@@ -237,49 +237,6 @@ describe('MembershipService', function() {
237
237
// declaring intent, if not, this test will compare raw output.
238
238
it ( 'should build a map for the tabbed role list interface' , function ( ) {
239
239
240
- var mappedRoleBindings = MembershipService . mapRolebindingsForUI ( roleBindings , keyedRoles ) ;
241
- var userBinding = mappedRoleBindings [ 0 ] ;
242
- var groupBinding = mappedRoleBindings [ 1 ] ;
243
- var serviceAccountBinding = mappedRoleBindings [ 2 ] ;
244
- var systemUserBinding = mappedRoleBindings [ 3 ] ;
245
- var systemGroupBinding = mappedRoleBindings [ 4 ] ;
246
-
247
- // specific tests to ease pain in debugging
248
- expect ( userBinding . kind ) . toEqual ( 'User' ) ;
249
- expect ( userBinding . sortOrder ) . toEqual ( 1 ) ;
250
- expect ( userBinding . name ) . toEqual ( 'User' ) ;
251
- expect ( _ . size ( userBinding . subjects ) ) . toEqual ( 2 ) ;
252
- expect ( _ . map ( userBinding . subjects , 'name' ) ) . toEqual ( [ 'jill' , 'jack' ] ) ;
253
- expect ( _ . keys ( userBinding . subjects [ '-jill' ] . roles ) ) . toEqual ( [ 'ClusterRole-admin' , 'ClusterRole-view' ] ) ;
254
- expect ( _ . map ( userBinding . subjects [ '-jill' ] . roles , 'metadata.name' ) ) . toEqual ( [ 'admin' , 'view' ] ) ;
255
- expect ( _ . keys ( userBinding . subjects [ '-jack' ] . roles ) ) . toEqual ( [ 'ClusterRole-edit' ] ) ;
256
- expect ( _ . map ( userBinding . subjects [ '-jack' ] . roles , 'metadata.name' ) ) . toEqual ( [ 'edit' ] ) ;
257
-
258
- expect ( groupBinding ) . toEqual ( {
259
- kind : 'Group' ,
260
- sortOrder : 2 ,
261
- name : 'Group' ,
262
- subjects : { }
263
- } ) ;
264
-
265
- expect ( serviceAccountBinding . kind ) . toEqual ( 'ServiceAccount' ) ;
266
- expect ( serviceAccountBinding . sortOrder ) . toEqual ( 3 ) ;
267
- expect ( serviceAccountBinding . description ) . toEqual ( 'Service accounts provide a flexible way to control API access without sharing a regular user’s credentials.' ) ;
268
- expect ( serviceAccountBinding . name ) . toEqual ( 'ServiceAccount' ) ;
269
- expect ( serviceAccountBinding . helpLinkKey ) . toEqual ( 'service_accounts' ) ;
270
- expect ( serviceAccountBinding . subjects [ 'fake-project-foo' ] . name ) . toEqual ( 'foo' ) ;
271
- expect ( serviceAccountBinding . subjects [ 'fake-project-foo' ] . namespace ) . toEqual ( 'fake-project' ) ;
272
-
273
- expect ( systemUserBinding . kind ) . toEqual ( 'SystemUser' ) ;
274
- expect ( systemUserBinding . sortOrder ) . toEqual ( 4 ) ;
275
- expect ( systemUserBinding . description ) . toEqual ( 'System users are virtual users automatically provisioned by the system.' ) ;
276
- expect ( systemUserBinding . helpLinkKey ) . toEqual ( 'users_and_groups' ) ;
277
-
278
- expect ( systemGroupBinding . kind ) . toEqual ( 'SystemGroup' ) ;
279
- expect ( systemGroupBinding . sortOrder ) . toEqual ( 5 ) ;
280
- expect ( systemGroupBinding . description ) . toEqual ( 'System groups are virtual groups automatically provisioned by the system.' ) ;
281
- expect ( systemGroupBinding . helpLinkKey ) . toEqual ( 'users_and_groups' ) ;
282
-
283
240
// the full output tree should match
284
241
expect ( MembershipService . mapRolebindingsForUI ( roleBindings , keyedRoles ) )
285
242
. toEqual ( [ {
0 commit comments