@@ -530,17 +530,22 @@ func TestGetUsers(t *testing.T) {
530
530
})
531
531
t .Run ("ActiveUsers" ,func (t * testing.T ) {
532
532
t .Parallel ()
533
+ active := make ([]codersdk.User ,0 )
533
534
client := coderdtest .New (t ,nil )
534
535
first := coderdtest .CreateFirstUser (t ,client )
535
- active := make ([]codersdk.User ,0 )
536
+
537
+ firstUser ,err := client .User (context .Background (),first .UserID )
538
+ require .NoError (t ,err ,"" )
539
+ active = append (active ,firstUser )
540
+
541
+ // Alice will be suspended
536
542
alice ,err := client .CreateUser (context .Background (), codersdk.CreateUserRequest {
537
543
Email :"alice@email.com" ,
538
544
Username :"alice" ,
539
545
Password :"password" ,
540
546
OrganizationID :first .OrganizationID ,
541
547
})
542
548
require .NoError (t ,err )
543
- active = append (active ,alice )
544
549
545
550
bruno ,err := client .CreateUser (context .Background (), codersdk.CreateUserRequest {
546
551
Email :"bruno@email.com" ,
@@ -551,7 +556,7 @@ func TestGetUsers(t *testing.T) {
551
556
require .NoError (t ,err )
552
557
active = append (active ,bruno )
553
558
554
- _ ,err = client .SetUserStatus (context .Background (),first . UserID ,codersdk .UserStatusSuspended )
559
+ _ ,err = client .SetUserStatus (context .Background (),alice . ID ,codersdk .UserStatusSuspended )
555
560
require .NoError (t ,err )
556
561
557
562
users ,err := client .Users (context .Background (), codersdk.UsersRequest {