Skip to content

Commit f7d3e17

Browse files
committed
unit test
1 parent ed2b48f commit f7d3e17

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
@@ -558,6 +558,8 @@ func (q *FakeQuerier) templateWithNameNoLock(tpl database.TemplateTable) databas
558558
withNames.CreatedByUsername = user.Username
559559
withNames.CreatedByAvatarURL = user.AvatarURL
560560
withNames.OrganizationName = org.Name
561+
withNames.OrganizationDisplayName = org.DisplayName
562+
withNames.OrganizationIcon = org.Icon
561563
return withNames
562564
}
563565

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)