Skip to content

Commit af05505

Browse files
committed
unit test
1 parent c8d0e3b commit af05505

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

coderd/database/dbmem/dbmem.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,8 @@ func (q *FakeQuerier) templateWithNameNoLock(tpl database.TemplateTable) databas
557557
withNames.CreatedByUsername = user.Username
558558
withNames.CreatedByAvatarURL = user.AvatarURL
559559
withNames.OrganizationName = org.Name
560+
withNames.OrganizationDisplayName = org.DisplayName
561+
withNames.OrganizationIcon = org.Icon
560562
return withNames
561563
}
562564

coderd/templates_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,8 @@ func TestTemplatesByOrganization(t *testing.T) {
451451
for _, tmpl := range templates {
452452
require.Equal(t, tmpl.OrganizationID, user.OrganizationID, "organization ID")
453453
require.Equal(t, tmpl.OrganizationName, org.Name, "organization name")
454+
require.Equal(t, tmpl.OrganizationDisplayName, org.DisplayName, "organization display name")
455+
require.Equal(t, tmpl.OrganizationIcon, org.Icon, "organization display name")
454456
}
455457
})
456458
t.Run("MultipleOrganizations", func(t *testing.T) {

site/src/api/typesGenerated.ts

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)