@@ -167,11 +167,13 @@ func TestTemplateEdit(t *testing.T) {
167
167
168
168
// Test the cli command.
169
169
displayName := "New Display Name 789"
170
+ description := "New Description ABC"
170
171
icon := "/icons/new-icon.png"
171
172
cmdArgs := []string {
172
173
"templates" ,
173
174
"edit" ,
174
175
template .Name ,
176
+ "--description" , description ,
175
177
"--display-name" , displayName ,
176
178
"--icon" , icon ,
177
179
}
@@ -186,8 +188,8 @@ func TestTemplateEdit(t *testing.T) {
186
188
// Assert that the template metadata changed.
187
189
updated , err := client .Template (context .Background (), template .ID )
188
190
require .NoError (t , err )
189
- assert .Equal (t , template .Name , updated .Name ) // doesn't change
190
- assert .Equal (t , initialDescription , updated .Description ) // doesn't change
191
+ assert .Equal (t , template .Name , updated .Name ) // doesn't change
192
+ assert .Equal (t , description , updated .Description )
191
193
assert .Equal (t , displayName , updated .DisplayName )
192
194
assert .Equal (t , icon , updated .Icon )
193
195
})
@@ -234,9 +236,9 @@ func TestTemplateEdit(t *testing.T) {
234
236
require .NoError (t , err )
235
237
// Properties don't change
236
238
assert .Equal (t , template .Name , updated .Name )
237
- assert .Equal (t , template .Description , updated .Description )
238
239
// These properties are removed, as the API considers it as "delete" request
239
240
// See: https://github.com/coder/coder/issues/5066
241
+ assert .Equal (t , "" , updated .Description )
240
242
assert .Equal (t , "" , updated .Icon )
241
243
assert .Equal (t , "" , updated .DisplayName )
242
244
})
0 commit comments