(t *testing.T)
| 158 | } |
| 159 | |
| 160 | func TestRunEncrypt_Interactive_ShortPassword(t *testing.T) { |
| 161 | defer resetMocks() |
| 162 | |
| 163 | var fatalMsg string |
| 164 | fatalFn = func(args ...interface{}) { fatalMsg = fmt.Sprint(args...) } |
| 165 | readPasswordFn = func(_ string) ([]byte, error) { return []byte("abc"), nil } |
| 166 | |
| 167 | runEncrypt() |
| 168 | assert.Contains(t, fatalMsg, "at least 4 characters") |
| 169 | } |
| 170 | |
| 171 | func TestRunEncrypt_Interactive_PasswordMismatch(t *testing.T) { |
| 172 | defer resetMocks() |
nothing calls this directly
no test coverage detected