(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestInstallHostnameForm_Submit(t *testing.T) { |
| 12 | form := NewInstallHostnameForm("ghcr.io/basecamp/once-campfire", "") |
| 13 | |
| 14 | hostnameFormTypeText(&form, "chat.example.com") |
| 15 | hostnameFormPressTab(&form) |
| 16 | form, cmd := form.Update(keyPressMsg("enter")) |
| 17 | require.NotNil(t, cmd) |
| 18 | |
| 19 | msg := cmd() |
| 20 | submit, ok := msg.(InstallFormSubmitMsg) |
| 21 | require.True(t, ok, "expected InstallFormSubmitMsg, got %T", msg) |
| 22 | assert.Equal(t, "ghcr.io/basecamp/once-campfire", submit.ImageRef) |
| 23 | assert.Equal(t, "chat.example.com", submit.Hostname) |
| 24 | } |
| 25 | |
| 26 | func TestInstallHostnameForm_Cancel(t *testing.T) { |
| 27 | form := NewInstallHostnameForm("ghcr.io/basecamp/once-campfire:latest", "") |
nothing calls this directly
no test coverage detected
searching dependent graphs…