Skip to content

Commit 6e8f740

Browse files
committed
Fix creating workspace as another user
1 parent d894e05 commit 6e8f740

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

coderd/workspaceagents_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,11 @@ func TestWorkspaceAgentAppStatus(t *testing.T) {
346346
ctx := testutil.Context(t, testutil.WaitMedium)
347347
client, db := coderdtest.NewWithDatabase(t, nil)
348348
user := coderdtest.CreateFirstUser(t, client)
349+
client, user2 := coderdtest.CreateAnotherUser(t, client, user.OrganizationID)
350+
349351
r := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
350352
OrganizationID: user.OrganizationID,
351-
OwnerID: user.UserID,
353+
OwnerID: user2.ID,
352354
}).WithAgent(func(a []*proto.Agent) []*proto.Agent {
353355
a[0].Apps = []*proto.App{
354356
{

0 commit comments

Comments
 (0)