MCPcopy Index your code
hub / github.com/coder/coder / TestTemplate

Function TestTemplate

coderd/templates_test.go:35–50  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33)
34
35func TestTemplate(t *testing.T) {
36 t.Parallel()
37
38 t.Run("Get", func(t *testing.T) {
39 t.Parallel()
40 client := coderdtest.New(t, nil)
41 user := coderdtest.CreateFirstUser(t, client)
42 version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, nil)
43 template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID)
44
45 ctx := testutil.Context(t, testutil.WaitLong)
46
47 _, err := client.Template(ctx, template.ID)
48 require.NoError(t, err)
49 })
50}
51
52func TestPostTemplateByOrganization(t *testing.T) {
53 t.Parallel()

Callers

nothing calls this directly

Calls 7

NewFunction · 0.92
CreateFirstUserFunction · 0.92
CreateTemplateVersionFunction · 0.92
CreateTemplateFunction · 0.92
ContextFunction · 0.92
TemplateMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected