File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -605,6 +605,26 @@ func TestGroup(t *testing.T) {
605
605
require .NotContains (t , group .Members , user1 )
606
606
require .Contains (t , group .Members , user2 )
607
607
})
608
+
609
+ t .Run ("everyoneGroupReturnsEmpty" , func (t * testing.T ) {
610
+ t .Parallel ()
611
+
612
+ client := coderdenttest .New (t , nil )
613
+ user := coderdtest .CreateFirstUser (t , client )
614
+
615
+ _ = coderdenttest .AddLicense (t , client , coderdenttest.LicenseOptions {
616
+ Features : license.Features {
617
+ codersdk .FeatureTemplateRBAC : 1 ,
618
+ },
619
+ })
620
+ ctx , _ := testutil .Context (t )
621
+ // The 'Everyone' group always has an ID that matches the organization ID.
622
+ group , err := client .Group (ctx , user .OrganizationID )
623
+ require .NoError (t , err )
624
+ require .Len (t , group .Members , 0 )
625
+ require .Equal (t , "Everyone" , group .Name )
626
+ require .Equal (t , user .OrganizationID , group .OrganizationID )
627
+ })
608
628
}
609
629
610
630
// TODO: test auth.
You can’t perform that action at this time.
0 commit comments