Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
unit test
  • Loading branch information
Emyrk committed Jul 10, 2024
commit f7d3e17f52e75828b12317579191d6a7064b9a10
2 changes: 2 additions & 0 deletions coderd/database/dbmem/dbmem.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,8 @@ func (q *FakeQuerier) templateWithNameNoLock(tpl database.TemplateTable) databas
withNames.CreatedByUsername = user.Username
withNames.CreatedByAvatarURL = user.AvatarURL
withNames.OrganizationName = org.Name
withNames.OrganizationDisplayName = org.DisplayName
withNames.OrganizationIcon = org.Icon
return withNames
}

Expand Down
2 changes: 2 additions & 0 deletions coderd/templates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ func TestTemplatesByOrganization(t *testing.T) {
for _, tmpl := range templates {
require.Equal(t, tmpl.OrganizationID, user.OrganizationID, "organization ID")
require.Equal(t, tmpl.OrganizationName, org.Name, "organization name")
require.Equal(t, tmpl.OrganizationDisplayName, org.DisplayName, "organization display name")
require.Equal(t, tmpl.OrganizationIcon, org.Icon, "organization display name")
}
})
t.Run("MultipleOrganizations", func(t *testing.T) {
Expand Down
2 changes: 2 additions & 0 deletions site/src/api/typesGenerated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.