(t *testing.T)
| 23 | ) |
| 24 | |
| 25 | func 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 | |
| 58 | func TestAnnouncementBanners(t *testing.T) { |
| 59 | t.Parallel() |
nothing calls this directly
no test coverage detected