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

Function TestCustomLogoAndCompanyName

enterprise/coderd/appearance_test.go:25–56  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestCustomLogoAndCompanyName(t *testing.T) {
26 t.Parallel()
27
28 // Prepare enterprise deployment
29 ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
30 defer cancel()
31
32 adminClient, adminUser := coderdenttest.New(t, &coderdenttest.Options{DontAddLicense: true})
33 coderdenttest.AddLicense(t, adminClient, coderdenttest.LicenseOptions{
34 Features: license.Features{
35 codersdk.FeatureAppearance: 1,
36 },
37 })
38
39 anotherClient, _ := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID)
40
41 // Update logo and application name
42 uac := codersdk.UpdateAppearanceConfig{
43 ApplicationName: "ACME Ltd",
44 LogoURL: "http://logo-url/file.png",
45 }
46
47 err := adminClient.UpdateAppearance(ctx, uac)
48 require.NoError(t, err)
49
50 // Verify update
51 got, err := anotherClient.Appearance(ctx)
52 require.NoError(t, err)
53
54 require.Equal(t, uac.ApplicationName, got.ApplicationName)
55 require.Equal(t, uac.LogoURL, got.LogoURL)
56}
57
58func TestAnnouncementBanners(t *testing.T) {
59 t.Parallel()

Callers

nothing calls this directly

Calls 6

NewFunction · 0.92
AddLicenseFunction · 0.92
CreateAnotherUserFunction · 0.92
UpdateAppearanceMethod · 0.80
AppearanceMethod · 0.80
EqualMethod · 0.45

Tested by

no test coverage detected