(t *testing.T)
| 418 | } |
| 419 | |
| 420 | func Test_getBody_prompt(t *testing.T) { |
| 421 | ios, _, _, _ := iostreams.Test() |
| 422 | ios.SetStdinTTY(true) |
| 423 | ios.SetStdoutTTY(true) |
| 424 | prompterMock := &prompter.PrompterMock{} |
| 425 | prompterMock.InputFunc = func(message, defaultValue string) (string, error) { |
| 426 | return "a variable", nil |
| 427 | } |
| 428 | opts := &SetOptions{ |
| 429 | IO: ios, |
| 430 | Prompter: prompterMock, |
| 431 | } |
| 432 | body, err := getBody(opts) |
| 433 | assert.NoError(t, err) |
| 434 | assert.Equal(t, "a variable", body) |
| 435 | } |
| 436 | |
| 437 | func Test_getBody(t *testing.T) { |
| 438 | tests := []struct { |
nothing calls this directly
no test coverage detected