mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: ensure default org always exists (#12412)
* chore: ensure default org always exists First user just joins the org created by the migration
This commit is contained in:
@@ -87,6 +87,10 @@ func TestTemplateList(t *testing.T) {
|
||||
t.Parallel()
|
||||
client := coderdtest.New(t, &coderdtest.Options{})
|
||||
owner := coderdtest.CreateFirstUser(t, client)
|
||||
|
||||
org, err := client.Organization(context.Background(), owner.OrganizationID)
|
||||
require.NoError(t, err)
|
||||
|
||||
templateAdmin, _ := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID, rbac.RoleTemplateAdmin())
|
||||
|
||||
inv, root := clitest.New(t, "templates", "list")
|
||||
@@ -107,7 +111,7 @@ func TestTemplateList(t *testing.T) {
|
||||
require.NoError(t, <-errC)
|
||||
|
||||
pty.ExpectMatch("No templates found in")
|
||||
pty.ExpectMatch(coderdtest.FirstUserParams.Username)
|
||||
pty.ExpectMatch(org.Name)
|
||||
pty.ExpectMatch("Create one:")
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user